Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] #237 - Swagger Versioning 업데이트, 서버 url 명시, 사용하지 않는 파일 삭제 #238

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
Loading