[Swagger 초기 적용]
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.bio.bio_backend.global.config;
|
||||
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.info.Info;
|
||||
import io.swagger.v3.oas.models.info.Contact;
|
||||
import io.swagger.v3.oas.models.info.License;
|
||||
import io.swagger.v3.oas.models.servers.Server;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Configuration
|
||||
public class SwaggerConfig {
|
||||
|
||||
@Bean
|
||||
public OpenAPI openAPI() {
|
||||
return new OpenAPI()
|
||||
.info(new Info()
|
||||
.title("대상 미생물 분석 시스템 Backend API")
|
||||
.description("대상 미생물 분석 시스템 Backend 서비스의 REST API 문서")
|
||||
.version("v1.0.0")
|
||||
.license(new License()
|
||||
.name("STAM License")
|
||||
.url("https://stam.kr/")))
|
||||
.servers(List.of(
|
||||
new Server().url("http://localhost:8080/service").description("Local Development Server"),
|
||||
new Server().url("https://api.bio.com/service").description("Production Server")
|
||||
));
|
||||
}
|
||||
}
|
@@ -54,3 +54,11 @@ token.expiration_time_access=180000
|
||||
token.expiration_time_refresh=604800000
|
||||
token.secret_key= c3RhbV9qd3Rfc2VjcmV0X3Rva2Vuc3RhbV9qd3Rfc2VjcmV0X3Rva2Vu
|
||||
|
||||
# Swagger 설정
|
||||
springdoc.api-docs.path=/api-docs
|
||||
springdoc.swagger-ui.path=/swagger-ui.html
|
||||
springdoc.swagger-ui.operationsSorter=method
|
||||
springdoc.swagger-ui.tagsSorter=alpha
|
||||
springdoc.swagger-ui.doc-expansion=none
|
||||
springdoc.swagger-ui.disable-swagger-default-url=true
|
||||
|
||||
|
Reference in New Issue
Block a user