refactor: 接口文档配置命名规范
- OpenAPI 是规范,从 Swagger 2.0 演变和扩展 ,目前主流是 OpenAPI 3.x 标准。 - Swagger 是工具,从早期基于 Swagger 规范,随着 Swagger 2.0 被采纳并演化为 OpenAPI 规范后全面兼容 OpenAPI 规范
This commit is contained in:
@@ -14,23 +14,23 @@ import org.springframework.core.env.Environment;
|
|||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger 配置
|
* OpenAPI 接口文档配置
|
||||||
* <p>
|
|
||||||
*
|
*
|
||||||
* @author Ray
|
* @author Ray.Hao
|
||||||
* @see <a href="https://doc.xiaominfo.com/docs/quick-start">knife4j 快速开始</a>
|
* @see <a href="https://doc.xiaominfo.com/docs/quick-start">knife4j 快速开始</a>
|
||||||
* @since 2023/2/17
|
* @since 2023/2/17
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@Slf4j
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SwaggerConfig {
|
@Slf4j
|
||||||
|
public class OpenApiConfig {
|
||||||
|
|
||||||
private final Environment environment;
|
private final Environment environment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口信息
|
* 接口信息
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OpenAPI openApi() {
|
public OpenAPI openApi() {
|
||||||
|
|
||||||
Reference in New Issue
Block a user