Skip to content

[FIX] #218 Swagger 서버 URL 환경별 분리 - #219

Merged
PBEM22 merged 2 commits into
developfrom
fix/#218/swagger-server-url
Jul 28, 2026
Merged

[FIX] #218 Swagger 서버 URL 환경별 분리#219
PBEM22 merged 2 commits into
developfrom
fix/#218/swagger-server-url

Conversation

@PBEM22

@PBEM22 PBEM22 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

문제

SwaggerConfig에 서버 URL이 poti.kr로 하드코딩되어 있어 dev 환경에서 Swagger 요청이 prod로 날아가는 문제

해결

  • SWAGGER_SERVER_URL, SWAGGER_SERVER_DESC 환경변수로 서버 URL 관리
  • 기본값은 http://localhost:8080 (로컬 fallback)

환경별 .env 설정

dev

SWAGGER_SERVER_URL=https://dev.poti.kr
SWAGGER_SERVER_DESC=개발 서버 (Dev)

prod

SWAGGER_SERVER_URL=https://poti.kr
SWAGGER_SERVER_DESC=운영 서버 (Production)

prod .env에 위 값 추가 필요

Closes #218

Summary by CodeRabbit

  • 개선 사항
    • Swagger 문서의 서버 URL과 설명을 외부 설정으로 관리할 수 있도록 개선했습니다.
    • 환경변수가 없을 경우 기본 로컬 서버 정보가 사용됩니다.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@PBEM22, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: da9698a4-fb5f-4791-a7dd-defa20fd1c4f

📥 Commits

Reviewing files that changed from the base of the PR and between 26b9080 and c929a31.

📒 Files selected for processing (2)
  • src/main/java/org/sopt/poti/global/config/SwaggerConfig.java
  • src/main/resources/application.yml
📝 Walkthrough

Walkthrough

Swagger의 운영 서버 URL과 설명을 하드코딩하지 않고 환경변수 기반 설정으로 주입합니다. 주입된 서버를 기존 로컬 서버와 함께 OpenAPI 문서의 서버 목록에 등록합니다.

Changes

Swagger 서버 설정 외부화

Layer / File(s) Summary
설정 기반 Swagger 서버 적용
src/main/resources/application.yml, src/main/java/org/sopt/poti/global/config/SwaggerConfig.java
SWAGGER_SERVER_URLSWAGGER_SERVER_DESC를 기본값과 함께 설정하고, 주입된 값으로 currentServer를 생성해 OpenAPI 서버 목록에 등록합니다. 기존 로컬 서버는 유지됩니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 Swagger 서버 URL을 환경별로 분리한 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed application.yml과 SwaggerConfig 변경이 #218의 환경별 서버 URL 분리 요구를 충족합니다.
Out of Scope Changes check ✅ Passed 변경 범위가 Swagger 설정과 환경변수 주입에만 머물러 있어 별도 범위 이탈은 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#218/swagger-server-url

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PBEM22 PBEM22 self-assigned this Jul 27, 2026
@PBEM22
PBEM22 requested a review from 88guri July 27, 2026 01:26
@PBEM22 PBEM22 added 🚨 Fix 버그 수정 🔥 P0 당장 개발해야 하는 핵심 기능 🐴 채륜 막시무스 labels Jul 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/org/sopt/poti/global/config/SwaggerConfig.java`:
- Line 47: Update the server list construction in SwaggerConfig so localServer
is added only when its URL differs from currentServer; when the application.yml
default URL is used, retain a single server entry while preserving both entries
for distinct URLs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d7d57034-de37-4270-8d6e-49541b165508

📥 Commits

Reviewing files that changed from the base of the PR and between e4fd0a1 and 26b9080.

📒 Files selected for processing (2)
  • src/main/java/org/sopt/poti/global/config/SwaggerConfig.java
  • src/main/resources/application.yml

Comment thread src/main/java/org/sopt/poti/global/config/SwaggerConfig.java Outdated
- serverUrl이 localhost일 때 localServer를 추가하지 않도록 수정
- application.yml 충돌 해소: swagger + firebase + gemini 설정 모두 유지

@88guri 88guri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swagger 서버 URL 하드코딩 문제 깔끔하게 해결해주셨네요 ~
현재 서버가 드롭다운 첫 번째로 오도록 순서 바꾸신 것도 잘 봤습니다 😸

@PBEM22
PBEM22 merged commit 1c790e4 into develop Jul 28, 2026
2 checks passed
@PBEM22
PBEM22 deleted the fix/#218/swagger-server-url branch July 28, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐴 채륜 막시무스 🚨 Fix 버그 수정 🔥 P0 당장 개발해야 하는 핵심 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] Swagger 서버 URL 환경별 분리

2 participants