<h1>Welcome to the opscloud wiki!</h1>

<img src="https://img.shields.io/badge/Version-4.6.0-brightgreen.svg"></img>
<img src="https://img.shields.io/badge/OpenJDK-21-brightgreen.svg"></img> 
<img src="https://img.shields.io/badge/SpringBoot-3.2.0GA-brightgreen.svg"></img> 
<img src="https://img.shields.io/badge/MySQL-8-brightgreen.svg"></img>

作者很懒，他什么都不想写
<br/>
<img src="https://static.chuanyinet.com/files/felhpvx5orkyueut/4E3F53492C799049D8A5F55A32863BE0.jpg" width="300px"/>

#### OpenAPI

https://${sshServerHost}/swagger-ui.html

#### API Example

::: info
申请AccessToken: [个人详情](/index.html#/user/details)
:::

+ For example, command
```
$ curl -H "AccessToken: XXXXXXXXXXXXXX" https://${sshServerHost}/api/example/helloWorld

{"body":{"msg":"Welcome to Baiyi's operations world","requestTime":"2023-09-14 14:59:21"},"success":true,"msg":"success","code":0}
```

+ For feign client
```Java
public interface OpscloudV4API {

    @RequestLine("GET /api/example/helloWorld")
    @Headers({"Content-Type: application/json", "AccessToken: {accessToken}"})
    Object helloWorld(@Param("accessToken") String accessToken);

}

public class ExampleTest extends BaseUnit {

    private static final String url = "https://${sshServerHost}";

    private static final String accessToken = "XXXXXXXXXXXXXX";

    private OpscloudV4API buildOc4API() {
        return Feign.builder()
                .retryer(new Retryer.Default(3000, 3000, 3))
                .encoder(new JacksonEncoder())
                .decoder(new JacksonDecoder())
                .target(OpscloudV4API.class, ExampleTest.url);
    }

    @Test
    public void helloWorldTest() {
        OpscloudV4API oc4API = buildOc4API();
        Object result = oc4API.helloWorld(accessToken);
        System.out.println(result.toString());
    }

}
```