-
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.
Merge pull request #303 from team9502/feature/global
fix: swagger url ํ์ ์ถ๊ฐ
- Loading branch information
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") | ||
|