Make GroupedOpenApi
This commit is contained in:
@@ -45,11 +45,9 @@ public class SecurityConfig {
|
||||
.authorizeRequests()
|
||||
.antMatchers(
|
||||
"/",
|
||||
"/auth/signUp",
|
||||
"/auth/**",
|
||||
"/user/userList",
|
||||
"/auth/signIn*",
|
||||
"/user/profile/view/**",
|
||||
"/auth/regenerateToken",
|
||||
"/swagger-ui*/**",
|
||||
"/v3/api-docs/**",
|
||||
"/favicon.ico"
|
||||
|
||||
@@ -9,13 +9,21 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class SwaggerConfig {
|
||||
// @Bean
|
||||
// public GroupedOpenApi jwtApi() {
|
||||
// return GroupedOpenApi.builder()
|
||||
// .group("jwt-api")
|
||||
// .pathsToMatch("/**")
|
||||
// .build();
|
||||
// }
|
||||
@Bean
|
||||
public GroupedOpenApi securityApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("authentication is required")
|
||||
.pathsToMatch("/user/profile")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi nonSecurityApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("authentication isn't required")
|
||||
.pathsToExclude("/user/profile")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public OpenAPI customOpenAPI() {
|
||||
|
||||
Reference in New Issue
Block a user