Skip to content

Commit

Permalink
fix: swagger url 타입 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
EUNCHAEv1006 committed Jul 30, 2024
1 parent 421d87e commit efc1d58
Showing 1 changed file with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,39 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;

@Configuration
public class SwaggerConfig {

@Bean
public OpenAPI customOpenAPI() {

Server server = new Server();
server.setUrl("https://www.sinchulgwinong.site/");
// 로컬 서버 설정
Server localServer = new Server();
localServer.setUrl("http://localhost:8080");
localServer.setDescription("Local Development Server");

// 프로덕션 HTTPS 서버 설정
Server prodHttpsServer = new Server();
prodHttpsServer.setUrl("https://www.sinchulgwinong.site/");
prodHttpsServer.setDescription("Production HTTPS Server");

// 개발 서버 설정
Server devServer = new Server();
devServer.setUrl("https://cat.sinchulgwinong.site/");
devServer.setDescription("Development Server");

return new OpenAPI()
.servers(Arrays.asList(localServer, prodHttpsServer, devServer))
.info(new Info()
.title("신출귀농 API 문서")
.description("""
### 신출귀농 애플리케이션의 API 문서입니다.
\s
#### [백엔드 개발자]
\s
1. 김은채
[email protected]
\s
2. 창다은
[email protected]""")
.version("1.0.0")
Expand Down

0 comments on commit efc1d58

Please sign in to comment.