-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 모든 ISBN 사용 로직을 ISBN13을 사용하도록 변경 #80
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
Changes from 3 commits
9f7ea9b
f097d52
3bb5b25
b1ad3e2
f9df643
08d9473
272d036
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,10 +6,10 @@ import jakarta.validation.constraints.NotNull | |||||||||
| import java.util.UUID | ||||||||||
|
|
||||||||||
| @Schema( | ||||||||||
| name = "UserBooksByIsbnsRequest", | ||||||||||
| name = "UserBooksByIsbn13sRequest", | ||||||||||
| description = "Request DTO for finding user books by user ID and a list of ISBNs" | ||||||||||
| ) | ||||||||||
| data class UserBooksByIsbnsRequest private constructor( | ||||||||||
| data class UserBooksByIsbn13sRequest private constructor( | ||||||||||
| @Schema( | ||||||||||
| description = "사용자 ID", | ||||||||||
| example = "1" | ||||||||||
|
|
@@ -21,16 +21,16 @@ data class UserBooksByIsbnsRequest private constructor( | |||||||||
| description = "도서 ISBN 목록", | ||||||||||
| example = "[\"9788966262429\", \"9791190412351\"]" | ||||||||||
| ) | ||||||||||
| @field:NotEmpty(message = "isbns는 비어있을 수 없습니다.") | ||||||||||
| val isbns: List<String>? = null | ||||||||||
| @field:NotEmpty(message = "isbn13 리스트는 비어있을 수 없습니다.") | ||||||||||
| val isbn13s: List<String>? = null | ||||||||||
|
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) 검증 메시지 용어 일관성을 개선해주세요. 검증 메시지가 "isbn13 리스트"로 되어 있지만, 실제 프로퍼티명은 다음과 같이 수정을 제안합니다: -@field:NotEmpty(message = "isbn13 리스트는 비어있을 수 없습니다.")
+@field:NotEmpty(message = "isbn13s는 비어있을 수 없습니다.")📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| ) { | ||||||||||
| fun validUserId(): UUID = userId!! | ||||||||||
| fun validIsbns(): List<String> = isbns!! | ||||||||||
| fun validIsbn13s(): List<String> = isbn13s!! | ||||||||||
|
|
||||||||||
| companion object { | ||||||||||
| fun of(userId: UUID, isbns: List<String>): UserBooksByIsbnsRequest { | ||||||||||
| return UserBooksByIsbnsRequest(userId = userId, isbns = isbns) | ||||||||||
| fun of(userId: UUID, isbn13s: List<String>): UserBooksByIsbn13sRequest { | ||||||||||
| return UserBooksByIsbn13sRequest(userId = userId, isbn13s = isbn13s) | ||||||||||
| } | ||||||||||
| } | ||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| package org.yapp.apis.book.service | ||
|
|
||
| import jakarta.validation.Valid | ||
| import org.yapp.apis.book.dto.request.BookDetailRequest | ||
| import org.yapp.apis.book.dto.request.BookSearchRequest | ||
| import org.yapp.apis.book.dto.response.BookDetailResponse | ||
| import org.yapp.apis.book.dto.response.BookSearchResponse | ||
|
|
||
| sealed interface BookQueryService { | ||
| fun searchBooks(request: BookSearchRequest): BookSearchResponse | ||
| fun getBookDetail(@Valid request: BookDetailRequest): BookDetailResponse | ||
| fun getBookDetail(request: BookDetailRequest): BookDetailResponse | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.