feat(food): 음식 상세 응답에 이미지 갤러리 images[] 추가 - #264
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
대표는 내부 결과 타입도 해석된 URL 목록으로 줄였고, 정렬(대표 → |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
공개 GET /api/foods/{id} 에 images 배열을 더한다. 각 항목은 해석된 url 과
isPrimary 뿐이고, 대표가 항상 첫 번째로 온다(그다음은 sort_order·id 순).
food_image 는 BaseEntity 의 소프트 삭제 제약을 받으므로 살아 있는 행만 내려간다.
필드 추가만이라 하위 호환이고 기존 imageRef 는 그대로 둔다 — 대표 이미지의
정본은 여전히 imageRef 이며, 갤러리 행이 아직 없는 음식은 빈 배열이다.
어드민이 imageRef 를 직접 편집하면 갤러리와 어긋날 수 있는데, 그 동기화는
KB-414 범위라 여기서는 없는 값을 지어내지 않는다.
테스트: 대표+추가 2장의 순서·URL 해석, 갤러리 행이 없을 때 빈 배열,
소프트 삭제된 이미지 제외.
Refs KB-565
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GukKBwfa8dRLMzhK4LoqvJ
대표 이미지는 imageRef 로 이미 내려가고 정렬 규약이 "대표가 항상 첫 번째"라
isPrimary 는 같은 사실을 세 번째로 말하는 중복이다(예진 결정). 겸사겸사
is- 접두 boolean 의 직렬화 함정도 계약에서 사라진다.
응답 항목은 {url} 하나가 되고, 내부 결과 타입도 해석된 URL 목록으로 줄인다.
정렬(대표 우선 → sort_order → id)·빈 배열·소프트 삭제 제외는 그대로다.
Swagger 는 "대표(imageRef 와 같은 URL)가 항상 첫 번째"로 고쳤다.
테스트: images[0].isPrimary 단언을 images[0].url == imageRef 로 바꿨다.
Refs KB-565
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GukKBwfa8dRLMzhK4LoqvJ
48097da to
15fbc25
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Issue Number
(Jira 로만 추적 — 닫는 GitHub 이슈 없음)
무엇을 / 왜
앱 음식 상세에서 이미지를 여러 장 보여주기 위해(FE P-383) 공개
GET /api/foods/{foodId}응답에images[]를 더한다. 필드 추가만이라 하위 호환이고 스키마 변경은 없다 —food_image테이블과 백필은 KB-413(#230)에서 이미 들어갔다. Refs KB-565변경 사항
FoodDetailResponse.images: List<FoodImageResponse>추가. 항목은 해석된url과isPrimary둘뿐이다.sort_order→id순.FoodService.getDetail이FoodImageJpaRepository로 갤러리를 읽고ImageUrls.resolve로 URL 을 만든다.food_image는BaseEntity의@SQLRestriction을 받으므로 소프트 삭제된 이미지는 자동 제외된다.계약 메모
imageRef는 그대로다. 대표 이미지의 정본은 여전히imageRef이고 앱의 기존 사용처는 영향이 없다.imageRef로 지어내지 않는다 — 어드민이imageRef를 직접 편집하면 갤러리와 어긋날 수 있는데, 그 동기화는 KB-414 범위라 여기서 임시로 메우면 그 불일치를 가린다.url이면 충분하고, id 가 필요한 쪽은 어드민 갤러리(KB-414)다. 필요하면 알려 주면 추가한다.테스트
images빈 배열,imageRef유지전체 빌드 그린(1897건 실행·실패 0).
🤖 Generated with Claude Code
https://claude.ai/code/session_01GukKBwfa8dRLMzhK4LoqvJ