-
Notifications
You must be signed in to change notification settings - Fork 0
fix: V2 리뷰 별점 관련 입력값 검증 #256
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
Conversation
Summary of ChangesHello @yongjun0511, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 V2 API의 리뷰 생성 기능에 대한 입력값 유효성 검증을 강화합니다. 식단 및 메뉴 리뷰의 평점 필드에 1부터 5까지의 범위 제한을 두어, 잘못된 평점 입력으로 인한 오류를 방지하고 데이터의 무결성을 확보하는 것이 주된 목적입니다. 이를 통해 API의 안정성과 신뢰성을 향상시킵니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. 입력값 검증 오류 막아 안정성 코드의 방패 Footnotes
|
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.
Code Review
V2 API의 리뷰 별점 입력값에 대한 검증 로직을 추가하여 API 안정성과 데이터 무결성을 높인 좋은 변경입니다. 다만, 몇 가지 개선점을 제안합니다. 각 DTO의 @Min, @Max 어노테이션에 message 속성을 추가하여 유효성 검증 실패 시 더 명확한 에러 메시지를 사용자에게 반환하는 것을 권장합니다. 또한, CreateMenuReviewRequest에서는 별점을 1점에서 5점으로 제한했지만, Ratings 클래스에서는 0점에서 5점으로 검증하고 있어 불일치가 존재합니다. 도메인 모델의 불변성이 API 계약과 일치하도록 Ratings 클래스의 검증 로직도 1점에서 5점으로 수정하여 일관성을 유지하는 것을 고려해보시는 것이 좋겠습니다.
| @Min(1) | ||
| @Max(5) |
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.
| @Min(1) | ||
| @Max(5) |
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.
| @Min(1) | ||
| @Max(5) |
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.
| @Min(1) | ||
| @Max(5) |
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.
#️⃣ Issue Number
📝 요약(Summary)
💬 공유사항 to 리뷰어
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.