-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
421d87e
commit efc1d58
Showing
1 changed file
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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") | ||
|