Skip to content

feat: springdoc-openapi로 Swagger API 문서 자동화 도입 - #231

Merged
unam98 merged 1 commit into
devfrom
feat/swagger-openapi
Aug 6, 2026
Merged

feat: springdoc-openapi로 Swagger API 문서 자동화 도입#231
unam98 merged 1 commit into
devfrom
feat/swagger-openapi

Conversation

@unam98

@unam98 unam98 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

작업 배경

  • 컨트롤러 @WebMvcTest 스윕이 끝나 API 스펙(요청/응답 DTO, 검증 규칙)이 안정된 지금이 API 문서화 도입에 적합한 시점이라 판단해 진행한다.
  • 지금까지 API 스펙은 코드를 직접 읽어야만 확인 가능했음 — Swagger로 자동 생성/시각화한다.

변경 사항

영역 내용
build.gradle springdoc-openapi-ui:1.7.0 의존성 추가 (Spring Boot 2.7.x / javax 네임스페이스와 호환되는 1.x 최종 버전)
config/swagger/SwaggerConfig.java (신규) OpenAPI 메타 정보 + accessToken/refreshToken 커스텀 헤더 인증을 위한 SecurityScheme 구성

영향 범위

  • 기존 컨트롤러/DTO에 별도 애노테이션 없이 자동으로 스펙이 생성됨 — 기존 코드 변경 없음, 런타임 동작 변경 없음.
  • /swagger-ui/index.html에서 전체 API(10개 컨트롤러, 26개 엔드포인트) 확인 가능. /v3/api-docs로 OpenAPI 3.0 JSON 스펙도 제공.
  • 이 프로젝트는 표준 Authorization: Bearer 대신 accessToken/refreshToken 커스텀 헤더로 인증하므로, Swagger UI의 "Authorize"에서 두 헤더 값을 직접 입력해 바로 API를 테스트할 수 있도록 구성했다 (스크린샷 참고).

Test Plan

  • 로컬 postgres/redis 기동 후 ./gradlew test 전체 251/251 통과 (신규 의존성이 슬라이스 테스트 컨텍스트 로딩에 영향 없음 확인)
  • 로컬 서버 기동 후 브라우저로 /swagger-ui/index.html 직접 확인 — 전체 엔드포인트 정상 렌더링, Authorize 모달에서 accessToken/refreshToken 헤더 입력 필드 확인

🤖 Generated with Claude Code

기존 REST 컨트롤러/DTO에 springdoc-openapi-ui를 붙여 /swagger-ui/index.html에서
전체 API 스펙(26개 엔드포인트)을 자동 생성한다. accessToken/refreshToken
커스텀 헤더 인증 방식에 맞춰 Swagger UI의 Authorize에서 두 헤더 값을
직접 입력해 테스트할 수 있도록 SecurityScheme을 구성했다.
@unam98 unam98 self-assigned this Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 19 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 176cdbcf-ee18-4359-8d7c-148739df0cb5

📥 Commits

Reviewing files that changed from the base of the PR and between e063716 and 9d4dc65.

📒 Files selected for processing (2)
  • build.gradle
  • src/main/java/org/runnect/server/config/swagger/SwaggerConfig.java

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.

@unam98
unam98 merged commit 4322980 into dev Aug 6, 2026
2 checks passed
@unam98
unam98 deleted the feat/swagger-openapi branch August 6, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants