diff --git a/build.gradle b/build.gradle index d47b94b..f4371ba 100644 --- a/build.gradle +++ b/build.gradle @@ -24,6 +24,7 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'com.mysql:mysql-connector-j' diff --git a/src/main/java/com/endlesshorses/oot/swagger/SwaggerConfig.java b/src/main/java/com/endlesshorses/oot/swagger/SwaggerConfig.java new file mode 100644 index 0000000..5038170 --- /dev/null +++ b/src/main/java/com/endlesshorses/oot/swagger/SwaggerConfig.java @@ -0,0 +1,24 @@ +package com.endlesshorses.oot.swagger; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +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("OOT") + .description("OOT API 명세") + .version("1.0.0"); + } +} \ No newline at end of file