-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(global): swagger 설정 변경/추 #32
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
The head ref may contain hidden characters: "feature/#28-swagger\uC124\uC815"
Conversation
- 에러handler에 @hidden 으로 변경 - 각 컨트롤러 메서드에 스웨거 어노테이션 추가
Walkthrough이번 변경 사항은 Swagger(OpenAPI) 문서화를 위해 컨트롤러와 예외 처리 클래스에 관련 어노테이션을 추가 및 수정한 작업입니다. 기존의 프로필 기반 활성화 방식 대신 문서화 관련 어노테이션으로 대체하였으며, API 엔드포인트에 설명 및 응답 정보를 명확히 주석 처리하였습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant StoreController
participant UserController
Client->>StoreController: API 요청 (예: 가게 목록 조회)
StoreController-->>Client: 응답 (Swagger 문서화 주석 포함)
Client->>UserController: API 요청 (예: 회원가입/로그인/내 정보 조회)
UserController-->>Client: 응답 (Swagger 문서화 주석 포함)
Possibly related PRs
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/main/java/com/example/gtable/store/controller/StoreController.java (1)
105-107: 검색 API 파라미터 문서화 개선 제안
@RequestParam("name")파라미터에@Parameter어노테이션을 추가하여 요청 파라미터 설명을 보강하면 더욱 완전한 API 문서화를 이룰 수 있습니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/java/com/example/gtable/global/security/exception/GlobalExceptionHandler.java(1 hunks)src/main/java/com/example/gtable/store/controller/StoreController.java(7 hunks)src/main/java/com/example/gtable/user/controller/UserController.java(4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/main/java/com/example/gtable/store/controller/StoreController.java (1)
src/main/java/com/example/gtable/user/controller/UserController.java (1)
Tag(26-74)
🔇 Additional comments (14)
src/main/java/com/example/gtable/global/security/exception/GlobalExceptionHandler.java (2)
22-22: @hidden import 추가 확인
Swagger 문서에서 예외 핸들러를 숨기기 위해io.swagger.v3.oas.annotations.Hidden을 올바르게 import했습니다.
26-26: GlobalExceptionHandler 클래스에 @hidden 적용
예외 처리 로직이 API 문서에 노출되지 않도록@Hidden애노테이션이 적절히 적용되었습니다.src/main/java/com/example/gtable/store/controller/StoreController.java (7)
21-23: Swagger 어노테이션 import 추가
컨트롤러에 필요한@Operation,@ApiResponse,@Tag어노테이션이 적절히 import되었습니다.
26-26: 클래스 레벨에 @tag 추가
"Store API"라는 태그와 설명이 일관성 있게 추가되어 API 문서의 가독성이 개선되었습니다.
35-37: 주점 등록 API에 @operation 및 @apiresponse 추가
등록 엔드포인트에 기능 요약과 응답 정보를 명확히 문서화했습니다.
50-52: 전체 주점 조회 API에 @operation 및 @apiresponse 추가
모든 주점 리스트 조회에 대한 설명과 응답 코드가 적절히 문서화되었습니다.
63-65: 특정 주점 조회 API에 @operation 및 @apiresponse 추가
ID 기반 조회 엔드포인트가 일관되게 문서화되었습니다.
76-78: 주점 수정 API에 @operation 및 @apiresponse 추가
수정 엔드포인트에 요약과 응답 정보를 잘 반영했습니다.
92-94: 주점 삭제 API에 @operation 및 @apiresponse 추가
삭제 엔드포인트의 목적과 응답 코드가 명확히 문서에 반영되었습니다.src/main/java/com/example/gtable/user/controller/UserController.java (5)
20-22: Swagger 어노테이션 import 추가
@Operation,@ApiResponse,@Tag어노테이션이 올바르게 import되었습니다.
26-26: 클래스 레벨에 @tag 추가
"User API" 태그로 사용자 관련 엔드포인트가 명확히 그룹화되었습니다.
36-38: 회원가입 API @operation 및 @apiresponse 추가
관리자 회원가입 엔드포인트에 요약과 응답 코드(201)가 일치하게 문서화되었습니다.
50-52: 내 정보 조회 API @operation 및 @apiresponse 추가
인증된 사용자 정보 조회에 대한 설명과 응답 코드(200)가 잘 반영되었습니다.
63-65: 로그인 API @operation 및 @apiresponse 추가
관리자 로그인 엔드포인트에 대한 요약과 응답 정보가 문서에 잘 추가되었습니다.
작업 요약
Issue Link
#28
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit