Skip to content

Commit

Permalink
feat: update swagger ui path
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Jul 14, 2024
1 parent c3e9423 commit 686b5d1
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 2 deletions.
9 changes: 9 additions & 0 deletions api-gateway/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
springdoc:
swagger-ui:
urls[0]:
name: "유저 서비스"
url: https://gateway-dev.mafoo.kr/user/v3/api-docs

urls[1]:
name: "사진 서비스"
url: https://gateway-dev.mafoo.kr/photo/v3/api-docs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
@Value("${app.gateway.endpoint}") String gatewayEndpoint;
@Bean
public OpenAPI openAPI() {
return new OpenAPI()
Expand All @@ -28,7 +30,7 @@ public OpenAPI openAPI() {
.url("https://opensource.org/licenses/MIT"))
)
.addServersItem(new Server()
.url("https://gateway.mafoo.kr/photo/")
.url(gatewayEndpoint + "/photo/")
.description("프로덕션 서버 사진/앨범 서비스 URL")
)
.addSecurityItem(new SecurityRequirement().addList("Authorization"))
Expand Down
3 changes: 3 additions & 0 deletions photo-service/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
app:
gateway:
endpoint: https://gateway-dev.mafoo.kr
3 changes: 3 additions & 0 deletions photo-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ spring:
enabled: true
user: ${MYSQL_USERNAME}
password: ${MYSQL_PASSWORD}
app:
gateway:
endpoint: https://gateway.mafoo.kr

cloud:
aws:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
@Value("${app.gateway.endpoint}") String gatewayEndpoint;
@Bean
public OpenAPI openAPI() {
return new OpenAPI()
Expand All @@ -28,7 +30,7 @@ public OpenAPI openAPI() {
.url("https://opensource.org/licenses/MIT"))
)
.addServersItem(new Server()
.url("https://gateway.mafoo.kr/user/")
.url(gatewayEndpoint+"/user/")
.description("프로덕션 서버 유저 서비스 URL")
)
.addSecurityItem(new SecurityRequirement().addList("Authorization"))
Expand Down
3 changes: 3 additions & 0 deletions user-service/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
app:
gateway:
endpoint: https://gateway-dev.mafoo.kr
2 changes: 2 additions & 0 deletions user-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ logging:
org.springframework.data.r2dbc: DEBUG

app:
gateway:
endpoint: https://gateway.mafoo.kr
oauth:
kakao:
client-id: ${KAKAO_CLIENT_ID}
Expand Down

0 comments on commit 686b5d1

Please sign in to comment.