Repository navigation
[docs] Swagger 문서 상세화 - #172
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
OpenAPI 도입(#170) 후속 작업. 컨트롤러/엔드포인트 문서 어노테이션과 응답 DTO 예시를 추가해 Swagger 문서 가독성을 높인다.
What — 무엇을 바꿨나
@Tag, 엔드포인트별@Operation추가@Schema(example)로 예시 값 추가 (공용 DTO는 여러 API에 재사용)Why — 왜 필요한가
자동 생성된 문서에 태그·설명·예시가 없어 가독성이 떨어졌다. 도메인별 그룹화·요약·예시로 프론트가 API를 파악하기 쉽게 한다.
How — 어떻게 구현했나
@Tag/@Operation은 정상 import,ApiResponse래퍼와 이름이 겹치는 에러 응답 어노테이션만 FQN으로 표기해 충돌 회피@ApiResponse(responseCode="200", useReturnTypeSchema=true)로 스키마와 함께 복구@Schema(example)에 두어 컨트롤러를 깔끔하게 유지하고 공용 DTO 예시를 재사용체크리스트
./gradlew test)관련 이슈
기타 / 리뷰 포인트
@Schema예시는 문서 표기용이며 실제 응답 값과 무관ApiResponseenvelope에 error 필드가 성공 스키마에도 노출)는 이번 범위 밖 → 별도 리팩터링 이슈로 다룰 예정