|
@@ -40,6 +40,17 @@ public class SwaggerUIConfig {
|
|
|
.group("管理端接口")
|
|
|
.displayName("管理端接口")
|
|
|
.pathsToMatch("/pc/**")
|
|
|
+ .addOpenApiCustomiser(openApi -> openApi.getPaths()
|
|
|
+ .values()
|
|
|
+ .forEach(pathItem -> pathItem.readOperations()
|
|
|
+ .forEach(operation -> operation.addParametersItem(
|
|
|
+ new io.swagger.v3.oas.models.parameters.Parameter()
|
|
|
+ .in("header")
|
|
|
+ .name("x-token")
|
|
|
+ .required(true)
|
|
|
+ .example("1111")
|
|
|
+ .description("认证令牌")
|
|
|
+ ))))
|
|
|
.build();
|
|
|
}
|
|
|
|
|
@@ -49,6 +60,17 @@ public class SwaggerUIConfig {
|
|
|
.group("移动端接口")
|
|
|
.displayName("移动端接口")
|
|
|
.pathsToMatch("/mini/**")
|
|
|
+ .addOpenApiCustomiser(openApi -> openApi.getPaths()
|
|
|
+ .values()
|
|
|
+ .forEach(pathItem -> pathItem.readOperations()
|
|
|
+ .forEach(operation -> operation.addParametersItem(
|
|
|
+ new io.swagger.v3.oas.models.parameters.Parameter()
|
|
|
+ .in("header")
|
|
|
+ .name("x-token")
|
|
|
+ .required(true)
|
|
|
+ .example("1111")
|
|
|
+ .description("认证令牌")
|
|
|
+ ))))
|
|
|
.build();
|
|
|
}
|
|
|
|