Skip to content

Commit

Permalink
[chore] #237 - Swagger Versioning 업데이트, 서버 url 명시, 사용하지 않는 파일 삭제 (#238)
Browse files Browse the repository at this point in the history
* [#237] delete(HELP.md): 파일 삭제

* [#237] chore: 버저닝 업데이트 및 url 명시 완료
  • Loading branch information
hoonyworld authored Oct 7, 2024
1 parent 1485949 commit a6f57e8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 34 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dev-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
DEV_ACCESS_TOKEN_EXPIRE_TIME: ${{ secrets.DEV_ACCESS_TOKEN_EXPIRE_TIME }}
DEV_REFRESH_TOKEN_EXPIRE_TIME: ${{ secrets.DEV_REFRESH_TOKEN_EXPIRE_TIME }}
DEV_ALLOWED_ORIGINS: ${{ secrets.DEV_ALLOWED_ORIGINS }}
DEV_SERVER_URL: ${{ secrets.DEV_SERVER_URL }}
run: |
cd ./src/main/resources
envsubst < application-dev.yml > application-dev.tmp.yml && mv application-dev.tmp.yml application-dev.yml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prod-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
PROD_ACCESS_TOKEN_EXPIRE_TIME: ${{ secrets.PROD_ACCESS_TOKEN_EXPIRE_TIME }}
PROD_REFRESH_TOKEN_EXPIRE_TIME: ${{ secrets.PROD_REFRESH_TOKEN_EXPIRE_TIME }}
PROD_ALLOWED_ORIGINS: ${{ secrets.PROD_ALLOWED_ORIGINS }}
PROD_SERVER_URL: ${{ secrets.PROD_SERVER_URL }}
run: |
cd ./src/main/resources
envsubst < application-prod.yml > application-prod.tmp.yml && mv application-prod.tmp.yml application-prod.yml
Expand Down
30 changes: 0 additions & 30 deletions HELP.md

This file was deleted.

10 changes: 8 additions & 2 deletions src/main/java/com/beat/global/swagger/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@
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.server.url}")
private String serverUrl;

@Bean
public OpenAPI openAPI() {
String jwt = "JWT";
Expand All @@ -21,7 +27,7 @@ public OpenAPI openAPI() {
.scheme("bearer")
.bearerFormat("JWT")
);
return new OpenAPI().addServersItem(new Server().url("/"))
return new OpenAPI().addServersItem(new Server().url(serverUrl))
.components(new Components())
.info(apiInfo())
.addSecurityItem(securityRequirement)
Expand All @@ -31,6 +37,6 @@ private Info apiInfo() {
return new Info()
.title("BEAT Project API")
.description("간편하게 소규모 공연을 등록하고 관리할 수 있는 티켓 예매 플랫폼")
.version("1.0.1");
.version("1.1.0");
}
}
6 changes: 5 additions & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ logging:
root: info # 추후 debug로 변경

cors:
allowed-origins: ${DEV_ALLOWED_ORIGINS}
allowed-origins: ${DEV_ALLOWED_ORIGINS}

app:
server:
url: ${DEV_SERVER_URL}
6 changes: 5 additions & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ logging:
root: info

cors:
allowed-origins: ${PROD_ALLOWED_ORIGINS}
allowed-origins: ${PROD_ALLOWED_ORIGINS}

app:
server:
url: ${PROD_SERVER_URL}

0 comments on commit a6f57e8

Please sign in to comment.