-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 홈화면 상품 응답 DTO를 ProductSimpleResponse로 통일 #160
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
46 changes: 0 additions & 46 deletions
46
src/main/java/com/ongil/backend/domain/product/dto/response/RecommendedProductResponse.java
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: IT-Cotato/12th-OnGil-BE
Length of output: 1531
🏁 Script executed:
Repository: IT-Cotato/12th-OnGil-BE
Length of output: 8053
getRecommendedProductsAPI 응답 구조 변경 — 필드 손실로 인한 하위 호환성 파괴RecommendedProductResponse에서ProductSimpleResponse로 변경되면서cartCount필드가 손실되었습니다. 이전 API는 "장바구니 담긴 횟수" 정보를 응답에 포함했으나, 현재는 해당 필드가 제거되었으므로 클라이언트가 이 데이터에 의존하고 있었다면 사일런트 브레이킹 체인지가 발생합니다.추가로
purchaseCount(구매 횟수),reviewCount(리뷰 개수) 필드가 신규 추가되었으므로, 의도적 리팩토링이라면 변경 사유와 클라이언트 영향 범위를 명확히 하시기 바랍니다.🤖 Prompt for AI Agents
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.
의도된 변경입니다. 홈화면 특가 상품 / 추천 상품 / 추천 브랜드 3개 API의 응답 DTO를
ProductSimpleResponse로 통일하는 리팩토링입니다.
동일하게 포함되도록 통일
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.
@neibler, 명확한 설명 감사합니다! 프론트엔드 팀과 확인 후 진행한 의도적인 리팩토링이라면 전혀 문제없습니다. frontend와 backend를 동시에 업데이트할 수 있는 환경에서는 통합된 변경이 문제를 일으키지 않으며, 여러 API 응답 DTO를 하나로 통일하는 것은 유지보수성을 높이는 좋은 아키텍처 결정입니다.특히
cartCount가 실제로 사용되지 않는 필드였고,purchaseCount/reviewCount는 다른 엔드포인트에 이미 존재했던 것을 표준화한 것이라면 일관성 있는 API 설계를 위한 올바른 접근입니다. 👍✏️ Learnings added