-
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
[FEAT] 레큐노트 생성 API 구현 #37
Conversation
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.
@ Schema, @ Tag, @ SecurityRequirement, @ Operation 등
Swagger 를 사용하여 API를 문서화할 때 사용되는 주석에 대해
코드를 보면서 참고할 수 있었습니다 !! 감사합니당 😊😊
수고했슈 !!!!!!!!!!!
@Schema(example = "test") | ||
String content, |
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.
@NotBlank
@Size(min = 1, max = 1000, message = "레큐노트 내용은 1자 이상 1000자 이하여야합니다.")
[P3] validation 추가하면 좋을 것 같습니당 !!!!
( 근데 1000자까지 쓸 일이 없을 것 같기도 하네욤 ....ㅎ )
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.
[P3]
예진이 말처럼 validation 추가 부탁드립니다!
그리고 color 숫자 범위 값도 나중에 확정되면 validation 해줘야 할것 같아요!
// TODO validation 추가
주석 남겨주시면 감사하겠습니다!
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.
수고하셨습니당~
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface BookRepository extends JpaRepository<Book, Long> { | ||
|
||
default Book getBookById(Long id) { |
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.
[P4]
저는 해당 default 메서드의 네이밍을 findByIdOrThrow로 짓는 편인데요!
- findBookById
- findBookByIdOrThrow
- findById
- findByIdOrThrow
중에서 어떤 네이밍이 좋다고 생각하시는지 궁금합니다!
그리고 find보단 get으로 쓰는걸 선호하시는 편인가요오~~??
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.
ㅋㅋㅋㅋㅋ P4까지 나왔군여
저는 기본 jpa 메서드를 find로 자주 써서, 헷갈리지 않으려고 get으로 사용했는데 findByIdOrThrow 이 이름도 괜찮습니다~
public interface MemberRepository extends JpaRepository<Member, Long> { | ||
|
||
boolean existsBySocialPlatformAndSocialId(SocialPlatform socialPlatform, String socialId); | ||
|
||
Optional<Member> findBySocialPlatformAndSocialId(SocialPlatform socialPlatform, String socialId); | ||
|
||
default Member getMemberById(Long id) { |
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.
[P4] 이 지점에서의 메서드명 네이밍도 함께 고민해보시면 좋을 것 같습니다!
@Schema(example = "test") | ||
String content, |
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.
[P3]
예진이 말처럼 validation 추가 부탁드립니다!
그리고 color 숫자 범위 값도 나중에 확정되면 validation 해줘야 할것 같아요!
// TODO validation 추가
주석 남겨주시면 감사하겠습니다!
src/main/java/org/sopt/lequuServer/domain/note/service/NoteService.java
Outdated
Show resolved
Hide resolved
# Conflicts: # src/main/java/org/sopt/lequuServer/domain/book/repository/BookRepository.java # src/main/java/org/sopt/lequuServer/domain/book/service/BookService.java # src/main/java/org/sopt/lequuServer/domain/member/repository/MemberRepository.java # src/main/java/org/sopt/lequuServer/domain/member/service/MemberService.java # src/main/java/org/sopt/lequuServer/global/exception/enums/SuccessType.java
📌 관련 이슈
closed #10
✨ 어떤 이유로 변경된 내용인지
🙏 검토 혹은 리뷰어에게 남기고 싶은 말