Skip to content

Commit

Permalink
✨ [Feat] Swagger 설정에 Server 도메인 주소 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
soochangoforit authored Jul 7, 2023
1 parent 45a94b7 commit d13fdfc
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,31 @@
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.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class OpenApiConfig {
@Bean
public OpenAPI springOpenAPI() {
Server serverLocal = new Server()
.url("http://localhost:8080")
.description("Local server");
Server serverProd = new Server()
.url("https://oversweet-core.shop")
.description("Production server");

Info info = new Info()
.title("OverSweet Core Server API")
.description("OverSweet Core API 명세서입니다.")
.version("v0.0.1");


return new OpenAPI()
.servers(List.of(serverLocal, serverProd))
.components(new Components())
.info(info);
}
Expand Down

0 comments on commit d13fdfc

Please sign in to comment.