OpenApiConfig.java
2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.glsx.usedcar.config;
import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.*;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.List;
/**
* <pre>
* Knife4j/OpenAPI配置类
* 用于启用和配置Swagger文档
* 访问地址:<a href="http://localhost:6905/vr/doc.html">aus-vr API文档</a>
* </pre>
* @author yangwei
* @since 2026/2/9 18:25
*/
@Configuration
public class OpenApiConfig {
@Bean
public OpenAPI customOpenApi() {
return new OpenAPI()
.info(new Info()
.title("aus-vr API文档")
.version("v1.0.0")
.description("""
## 发拍端后台管理系统 API
### 主要功能模块:
1. **发拍管理** - 发拍订单管理
2. **系统管理** - 用户认证与权限管理
### 接口规范:
- 所有接口均需在 Header 中携带 token
- 响应格式统一为:{ "code": "200", "success": true, "message": "操作成功","data": {} }
- 时间格式:yyyy-MM-dd HH:mm:ss
- 分页参数:page, size
### 版本历史:
| 版本 | 日期 | 描述 |
|------|------|------|
| v1.0.0 | 2026-04-30 | 初始版本 |
""")
.termsOfService("https://www.glsx.com")
.contact(new Contact()
.name("开发团队")
.email("yangwei@didihu.com.cn")
.url("https://gitee.com/foutouren/aus.git"))
.license(new License()
.name("Apache 2.0")
.url("http://www.apache.org/licenses/LICENSE-2.0.html")))
.externalDocs(new ExternalDocumentation()
.description("项目仓库地址")
.url("https://gitee.com/foutouren/aus"))
;
}
}