mirror of https://github.com/halo-dev/halo
Add all-api group for swagger (#2278)
#### What type of PR is this? /kind improvement /area core /milestone 2.0 #### What this PR does / why we need it: Add all-api group for swagger. Related to https://github.com/halo-dev/halo/pull/2273. #### Does this PR introduce a user-facing change? ```release-note None ```pull/2279/head
parent
5eec9da2e6
commit
fdbb513cb2
|
@ -30,8 +30,8 @@ public class SwaggerConfig {
|
||||||
@Bean
|
@Bean
|
||||||
GroupedOpenApi extensionCoreApi() {
|
GroupedOpenApi extensionCoreApi() {
|
||||||
return GroupedOpenApi.builder()
|
return GroupedOpenApi.builder()
|
||||||
.group("CoreAPI")
|
.group("core-api")
|
||||||
.displayName("Core API")
|
.displayName("Core APIs")
|
||||||
.pathsToMatch("/api/**")
|
.pathsToMatch("/api/**")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,8 @@ public class SwaggerConfig {
|
||||||
@Bean
|
@Bean
|
||||||
GroupedOpenApi extensionApi() {
|
GroupedOpenApi extensionApi() {
|
||||||
return GroupedOpenApi.builder()
|
return GroupedOpenApi.builder()
|
||||||
.group("ExtensionAPI")
|
.group("extension-api")
|
||||||
.displayName("Extension API")
|
.displayName("Extension APIs")
|
||||||
.pathsToMatch("/apis/**")
|
.pathsToMatch("/apis/**")
|
||||||
.pathsToExclude("/apis/api.halo.run/**", "/apis/plugin.api.halo.run/**")
|
.pathsToExclude("/apis/api.halo.run/**", "/apis/plugin.api.halo.run/**")
|
||||||
.build();
|
.build();
|
||||||
|
@ -49,8 +49,8 @@ public class SwaggerConfig {
|
||||||
@Bean
|
@Bean
|
||||||
GroupedOpenApi systemCustomApi() {
|
GroupedOpenApi systemCustomApi() {
|
||||||
return GroupedOpenApi.builder()
|
return GroupedOpenApi.builder()
|
||||||
.group("SystemCustomAPI")
|
.group("core-custom-api")
|
||||||
.displayName("System Custom API")
|
.displayName("Custom APIs in Core")
|
||||||
.pathsToMatch("/apis/api.halo.run/**")
|
.pathsToMatch("/apis/api.halo.run/**")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,19 @@ public class SwaggerConfig {
|
||||||
@Bean
|
@Bean
|
||||||
GroupedOpenApi pluginCustomApi() {
|
GroupedOpenApi pluginCustomApi() {
|
||||||
return GroupedOpenApi.builder()
|
return GroupedOpenApi.builder()
|
||||||
.group("PluginCustomAPI")
|
.group("plugin-custom-api")
|
||||||
.displayName("Plugin Custom API")
|
.displayName("Custom APIs in Plugin")
|
||||||
.pathsToMatch("/apis/plugin.api.halo.run/**")
|
.pathsToMatch("/apis/plugin.api.halo.run/**")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
GroupedOpenApi allApi() {
|
||||||
|
return GroupedOpenApi.builder()
|
||||||
|
.group("all-api")
|
||||||
|
.displayName("All APIs")
|
||||||
|
.pathsToMatch("/api/**", "/apis/**")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue