diff --git a/src/main/java/com/dnd/runus/presentation/config/SwaggerConfig.java b/src/main/java/com/dnd/runus/presentation/config/SwaggerConfig.java index 5f1abf4c..04a54da7 100644 --- a/src/main/java/com/dnd/runus/presentation/config/SwaggerConfig.java +++ b/src/main/java/com/dnd/runus/presentation/config/SwaggerConfig.java @@ -19,6 +19,7 @@ import org.apache.commons.lang3.ObjectUtils; import org.springdoc.core.customizers.OpenApiCustomizer; import org.springdoc.core.customizers.OperationCustomizer; +import org.springdoc.core.models.GroupedOpenApi; import org.springframework.boot.info.BuildProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -43,6 +44,16 @@ public class SwaggerConfig { private final BuildProperties buildProperties; private final Environment environment; + @Bean + GroupedOpenApi groupV1() { + return GroupedOpenApi.builder().group("V1").pathsToMatch("/api/v1/**").build(); + } + + @Bean + GroupedOpenApi groupV2() { + return GroupedOpenApi.builder().group("V2").pathsToMatch("/api/v2/**").build(); + } + @Bean OpenAPI openAPI() { SecurityScheme securityScheme = new SecurityScheme()