diff --git a/src/main/java/com/ceos/vote/common/config/SwaggerConfig.java b/src/main/java/com/ceos/vote/common/config/SwaggerConfig.java new file mode 100644 index 0000000..37c1fa0 --- /dev/null +++ b/src/main/java/com/ceos/vote/common/config/SwaggerConfig.java @@ -0,0 +1,25 @@ +package com.ceos.vote.common.config; + +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class SwaggerConfig { + + @Bean + public OpenAPI openAPI() { + return new OpenAPI() + .components(new Components()) + .info(apiInfo()); + } + + private Info apiInfo() { + return new Info() + .title("ceos-vote-api") + .description("CEOS 파트장∙팀 투표 서비스") + .version("1.0.0"); + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index b3dba39..771aec8 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -33,10 +33,7 @@ server: enabled: true force: true port: 8080 -# -#springdoc: -# version: v1.0.0 -# swagger-ui: -# path: /swagger-filmo.html -# tagsSorter: alpha -# operationsSorter: alpha + +springdoc: + swagger-ui: + path: /swagger-vote.html