Skip to content

Commit

Permalink
chore: swagger setting
Browse files Browse the repository at this point in the history
  • Loading branch information
youngeun-dev committed Feb 25, 2024
1 parent 1391762 commit d366e3b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'
}

tasks.named('test') {
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/server/capple/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.server.capple.config;

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;

/**
* Swagger springdoc-ui 구성 파일
*/
@Configuration
public class SwaggerConfig {
@Bean
public OpenAPI openAPI() {
Info info = new Info()
.title("Capple API Document")
.version("0.0.1")
.description("Capple API 명세서입니다.");
return new OpenAPI()
.components(new Components())
.info(info);
}
}

0 comments on commit d366e3b

Please sign in to comment.