Conversation
src/index.ts에서 refundRouter가 purchaseRouter보다 먼저 동일 prefix (/api/prompts/purchases)에 마운트되어, 향후 purchaseRouter에 :id 동적 라우트가 추가될 경우 refundRouter의 :purchaseId 패턴에 가려질 위험. 순서를 뒤집어 purchaseRouter가 먼저 매치되도록 정정. 프론트 영향 없음 (현재 purchaseRouter는 정적 path만 사용 - /requests, /, /complete).
#485 환불 흐름 도입 후 prompt.download.route.ts의 Swagger가 실제 응답과 완전 불일치 상태였음. 전면 재작성. - GET /:promptId/downloads - 응답 schema를 실제 service 반환 형태({message, title, prompt, is_free, is_paid, statusCode})로 정정 - 환불된 구매 시 403 Refunded 응답 예시 추가 - 결제 미완료 시 403 Forbidden 응답 예시 추가 - 첫 다운로드 시 Purchase.downloaded_at 기록 부작용 설명 추가 - GET /downloads - 기존 JSDoc 부재 → 전체 신규 작성 - 응답 schema에 has_review/is_recent_review/userReview/imageUrls 등 포함
- POST /complete 응답 status enum에 'Refunded' 추가 (#485에서 Status enum 확장됐는데 본 응답엔 누락 — 프론트 switch가 default fallthrough될 위험) - GET / (결제내역) 응답 schema에서 'pg' 필드 제거 — Swagger엔 명시됐으나 실제 PurchaseHistoryService.list가 반환하지 않는 stale 명세 (결제내역에 환불 표시 추가는 별도 커밋에서 service/DTO 변경과 함께 진행)
#473에서 /account/detail에 status 추가됐는데 admin 상세 응답엔 누락되어 일관성 결여. - IndividualSellerDetail / BusinessSellerDetail DTO에 status 필드 추가 - getIndividualSellerDetail / getBusinessSellerDetail 서비스에서 account.status 노출 - admin-seller.route.ts swagger 두 응답에 status enum 명세 추가 현재 admin 상세 API는 status='APPROVED'만 조회하지만, 향후 PENDING/REJECTED도 조회 가능하게 확장될 경우 응답 형식 변경 없이 그대로 동작.
이전 5개 커밋의 라우트 swagger 변경을 swagger.json에 반영.
[FIX] Swagger 갱신 — 정산/환불/다운로드 흐름 변경 사항 반영 + 라우터 마운트 순서 정정 (#494)
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
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.
📌 기능 설명
📌 구현 내용
📌 구현 결과
📌 논의하고 싶은 점