Skip to content

Commit

Permalink
Merge pull request #303 from team9502/feature/global
Browse files Browse the repository at this point in the history
fix: swagger url ํƒ€์ž… ์ถ”๊ฐ€
  • Loading branch information
EUNCHAEv1006 authored Jul 30, 2024
2 parents 7098d9c + efc1d58 commit b94ea0d
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 b94ea0d

Please sign in to comment.