-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreview-service.json
More file actions
1 lines (1 loc) · 11.6 KB
/
Copy pathreview-service.json
File metadata and controls
1 lines (1 loc) · 11.6 KB
1
{"openapi":"3.1.0","info":{"title":"KOK Review Service API","description":"리뷰 CRUD, 신고, 사장님 답글 API","version":"v1"},"servers":[{"url":"http://localhost:8000","description":"Gateway"}],"tags":[{"name":"Review","description":"리뷰 API"}],"paths":{"/api/v1/reviews/{reviewId}":{"get":{"tags":["Review"],"summary":"리뷰 상세 조회","operationId":"getReview","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReviewGetResponseDto"}}}}}},"put":{"tags":["Review"],"summary":"리뷰 수정","operationId":"updateReview","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewUpdateRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReviewUpdateResponseDto"}}}}}},"patch":{"tags":["Review"],"summary":"리뷰 삭제","operationId":"deleteReview","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReviewDeletedResponseDto"}}}}}}},"/api/v1/reviews/{reviewId}/replies":{"put":{"tags":["Review"],"summary":"사장님 답글 수정","operationId":"updateReply","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReplyRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReviewReplyResponseDto"}}}}}},"post":{"tags":["Review"],"summary":"사장님 답글 작성","operationId":"createReply","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReplyRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReviewReplyResponseDto"}}}}}},"patch":{"tags":["Review"],"summary":"사장님 답글 삭제","operationId":"deleteReply","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/v1/reviews":{"get":{"tags":["Review"],"summary":"매장 리뷰 목록 조회","operationId":"getReviews","parameters":[{"name":"storeId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"LATEST","enum":["LATEST","RATING_HIGH","RATING_LOW","HELPFUL"]}},{"name":"photoOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePageResponseReviewGetResponseDto"}}}}}},"post":{"tags":["Review"],"summary":"리뷰 생성","operationId":"createReview","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReviewCreateResponseDto"}}}}}}},"/api/v1/reviews/{reviewId}/reports":{"post":{"tags":["Review"],"summary":"리뷰 신고","operationId":"reportReview","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReportRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReviewReportResponseDto"}}}}}}},"/api/v1/reviews/reports/{reportId}/reject":{"patch":{"tags":["Review"],"summary":"신고 거부","operationId":"rejectReport","parameters":[{"name":"reportId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/v1/reviews/reports/{reportId}/approve":{"patch":{"tags":["Review"],"summary":"신고 승인","operationId":"approveReport","parameters":[{"name":"reportId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/v1/reviews/me":{"get":{"tags":["Review"],"summary":"내 리뷰 목록 조회","operationId":"getMyReviews","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"LATEST","enum":["LATEST","RATING_HIGH","RATING_LOW","HELPFUL"]}},{"name":"photoOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePageResponseReviewGetResponseDto"}}}}}}}},"components":{"schemas":{"ReviewUpdateRequestDto":{"type":"object","properties":{"rating":{"type":"number","maximum":5.0,"minimum":1.0},"content":{"type":"string","maxLength":1000,"minLength":10},"imageUrls":{"type":"array","items":{"type":"string","maxLength":500,"minLength":0},"maxItems":5,"minItems":0}},"required":["rating"]},"ApiResponseReviewUpdateResponseDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/ReviewUpdateResponseDto"}}},"ReviewUpdateResponseDto":{"type":"object","properties":{"reviewId":{"type":"string","format":"uuid"},"rating":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}}},"ReviewReplyRequestDto":{"type":"object","properties":{"content":{"type":"string","maxLength":1000,"minLength":1}}},"ApiResponseReviewReplyResponseDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/ReviewReplyResponseDto"}}},"ReviewReplyResponseDto":{"type":"object","properties":{"replyId":{"type":"string","format":"uuid"},"reviewId":{"type":"string","format":"uuid"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ReviewRequestDto":{"type":"object","properties":{"storeId":{"type":"string","format":"uuid"},"reservationId":{"type":"string","format":"uuid"},"rating":{"type":"number","maximum":5.0,"minimum":1.0},"content":{"type":"string","maxLength":1000,"minLength":10},"imageUrls":{"type":"array","items":{"type":"string","maxLength":500,"minLength":0},"maxItems":5,"minItems":0}},"required":["rating","reservationId","storeId"]},"ApiResponseReviewCreateResponseDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/ReviewCreateResponseDto"}}},"ReviewCreateResponseDto":{"type":"object","properties":{"storeId":{"type":"string","format":"uuid"},"reservationId":{"type":"string","format":"uuid"},"rating":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}}},"ReviewReportRequestDto":{"type":"object","properties":{"reason":{"type":"string","enum":["SPAM","ABUSE","ADVERTISEMENT","PRIVACY","INAPPROPRIATE","IRRELEVANT","ETC"]},"detail":{"type":"string","maxLength":500,"minLength":0}},"required":["reason"]},"ApiResponseReviewReportResponseDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/ReviewReportResponseDto"}}},"ReviewReportResponseDto":{"type":"object","properties":{"reportId":{"type":"string","format":"uuid"},"reviewId":{"type":"string","format":"uuid"},"reason":{"type":"string","enum":["SPAM","ABUSE","ADVERTISEMENT","PRIVACY","INAPPROPRIATE","IRRELEVANT","ETC"]},"createdAt":{"type":"string","format":"date-time"}}},"ApiResponseReviewDeletedResponseDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/ReviewDeletedResponseDto"}}},"ReviewDeletedResponseDto":{"type":"object","properties":{"reviewId":{"type":"string","format":"uuid"},"deletedAt":{"type":"string","format":"date-time"}}},"ApiResponseVoid":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"type":"object"}}},"ApiResponsePageResponseReviewGetResponseDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/PageResponseReviewGetResponseDto"}}},"PageResponseReviewGetResponseDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ReviewGetResponseDto"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"}}},"ReviewGetResponseDto":{"type":"object","properties":{"reviewId":{"type":"string","format":"uuid"},"storeId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"rating":{"type":"number"},"content":{"type":"string"},"imageUrls":{"type":"array","items":{"type":"string"}},"likeCount":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"userName":{"type":"string"},"storeName":{"type":"string"}}},"ApiResponseReviewGetResponseDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/ReviewGetResponseDto"}}}}}}