diff --git a/build.gradle b/build.gradle index d038542..6948a86 100644 --- a/build.gradle +++ b/build.gradle @@ -33,6 +33,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-amqp' implementation 'org.springframework.boot:spring-boot-starter-reactor-netty:3.0.0' implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64' + // Swagger + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/src/main/java/Be9room/festime/config/SwaggerConfig.java b/src/main/java/Be9room/festime/config/SwaggerConfig.java new file mode 100644 index 0000000..bc948d6 --- /dev/null +++ b/src/main/java/Be9room/festime/config/SwaggerConfig.java @@ -0,0 +1,27 @@ +package Be9room.festime.config; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class SwaggerConfig { + @Bean + public OpenAPI openAPI() { + + Info info = new Info() + .title("Festime API") + .description("API 명세서") + .version("1.0"); + + + + return new OpenAPI() + .info(info); + } + +}