-
Notifications
You must be signed in to change notification settings - Fork 0
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
사용자 제보 API 개발 (#105) #106
Merged
Merged
사용자 제보 API 개발 (#105) #106
Conversation
This file contains 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
jinhoon227
approved these changes
Feb 17, 2024
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.
승인합니다!
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.
⭐️ Issue Number
🚩 Summary
누락된 가게가 있어서 저희 애플리케이션에 누락된 가게를 신고, 저희가 제공하고있는 가게 중 잘못된 정보가 있을 때는 수정 요청, 폐업이나 인증제 박탈 등의 이유로 제거 요청 등에 대한 사용자 제보를 받을 수 있도록 제보 내용들을 담을 테이블을 별도로 마련하고 이와 관련된 API를 개발합니다.
정리하자면 신규 가게 추가 제보(new), 가게 정보 수정 제보(fix), 가게 삭제 제보(del) 이렇게 총 4가지 종류의 제보가 있습니다.
🛠️ Technical Concerns
유효성 검사
이번 PR은 거의 간단한 구현 작업들이라 크게 이슈될만한 상황은 없었지만 그래도 신경썼던 부분은 유효성 검사 로직입니다.
Request Body에 대해서 편하게 유효성 검사를 해주기 위해 Valid 애너테이션을 처음에 사용했었는데 애너테이션은 정상적으로 import가 되었지만 실제로는 NotEmpty, NotNull과 같은 애너테이션이 잘 동작하지 않는 것을 확인하였습니다.
그래서 관련해서 검색하던 중 이전에는 spring-boot-starter-web 의존성 내부에 validation이 있었지만, spring boot 2.3 version 이상부터는 아예 모듈로 빠져 validation 의존성을 따로 추가해줘야 한다고 해서 다음과 같은 내용을 build.gradle에 추가해줬습니다.
다시 빌드해주니 그 이후부터는 정상적으로 동작하였습니다.
📋 To Do