diff --git a/.github/workflows/prod-openapi.yml b/.github/workflows/prod-openapi.yml new file mode 100644 index 00000000..45e41d7a --- /dev/null +++ b/.github/workflows/prod-openapi.yml @@ -0,0 +1,74 @@ +name: Prod-OpenAPI to CodiveAPI + +on: + push: + branches: [ "main" ] + workflow_dispatch: {} + +permissions: + contents: read + +concurrency: + group: sync-openapi + cancel-in-progress: true + +jobs: + sync: + runs-on: ubuntu-latest + + env: + CODIVEAPI_BRANCH: main + TARGET_PATH: Sources/CodiveAPI/openapi.yaml + + steps: + - name: Checkout backend repo (for context only) + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Fetch OpenAPI JSON from production + env: + PROD_OPENAPI_URL: ${{ secrets.PROD_OPENAPI_URL }} + run: | + set -euo pipefail + echo "Fetching OpenAPI from: $PROD_OPENAPI_URL" + curl -fsSL --retry 5 --retry-delay 2 --connect-timeout 10 --max-time 30 \ + "$PROD_OPENAPI_URL" -o openapi.json + test -s openapi.json + head -c 1 openapi.json | grep -q '{' + + - name: Convert OpenAPI JSON -> YAML (swagger-cli) + run: | + set -euo pipefail + npm i -g @apidevtools/swagger-cli + swagger-cli bundle openapi.json --type yaml --outfile openapi.yaml + + - name: Checkout CodiveAPI repo + uses: actions/checkout@v4 + with: + repository: Clokey-dev/CodiveAPI + ref: ${{ env.CODIVEAPI_BRANCH }} + token: ${{ secrets.CODIVEAPI_PAT }} + path: codiveapi + fetch-depth: 1 + + - name: Copy openapi.yaml into CodiveAPI + run: | + set -euo pipefail + cp openapi.yaml "codiveapi/${TARGET_PATH}" + + - name: Commit & push if changed + working-directory: codiveapi + run: | + set -euo pipefail + git config user.name "clokey-bot" + git config user.email "clokey-bot@users.noreply.github.com" + + if git diff --quiet; then + echo "No changes detected. Skipping commit." + exit 0 + fi + + git add "${TARGET_PATH}" + git commit -m "chore: update openapi.yaml from production" + git push origin "${CODIVEAPI_BRANCH}" diff --git a/.gitignore b/.gitignore index e30b31bd..9899f3ff 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ out/ ### Custom ### .env +firebase-sa.** diff --git a/clokey-api/src/main/java/org/clokey/domain/auth/controller/AuthController.java b/clokey-api/src/main/java/org/clokey/domain/auth/controller/AuthController.java index 99ed2a35..cdc0490a 100644 --- a/clokey-api/src/main/java/org/clokey/domain/auth/controller/AuthController.java +++ b/clokey-api/src/main/java/org/clokey/domain/auth/controller/AuthController.java @@ -18,20 +18,26 @@ @RestController @RequestMapping("/auth") @RequiredArgsConstructor -@Tag(name = "1-1. 인증 API", description = "인증 관련 API입니다.") +@Tag(name = "01. 인증 API", description = "인증 관련 API입니다.") public class AuthController { private final AuthService authService; @GetMapping("/my-status") - @Operation(summary = "회원 상태 확인", description = "가입 완료 or 약관 동의 여부 확인 가능.") + @Operation( + operationId = "Auth_getUserStatus", + summary = "회원 상태 확인", + description = "가입 완료 or 약관 동의 여부 확인 가능.") public BaseResponse getUserStatus() { UserStatusResponse response = authService.getUserStatus(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); } @PatchMapping("/device-token") - @Operation(summary = "Device Token 갱신", description = "디바이스 토큰을 갱신합니다.") + @Operation( + operationId = "Auth_renewDeviceToken", + summary = "Device Token 갱신", + description = "디바이스 토큰을 갱신합니다.") public BaseResponse renewDeviceToken( @Valid @RequestBody DeviceTokenRenewRequest request) { authService.renewDeviceToken(request); @@ -40,6 +46,7 @@ public BaseResponse renewDeviceToken( @PostMapping("/reissue-token") @Operation( + operationId = "Auth_reissueTokens", summary = "토큰 재발급", description = "리프레시 토큰을 바탕으로 Access Token과 Refresh Token을 재발급합니다.") public BaseResponse reissueTokens( @@ -49,7 +56,10 @@ public BaseResponse reissueTokens( } @PostMapping("/logout") - @Operation(summary = "로그 아웃", description = "Redis에 저장된 사용자의 리프레시 토큰을 삭제합니다.") + @Operation( + operationId = "Auth_logoutUser", + summary = "로그 아웃", + description = "Redis에 저장된 사용자의 리프레시 토큰을 삭제합니다.") public BaseResponse logoutUser() { authService.logoutUser(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); diff --git a/clokey-api/src/main/java/org/clokey/domain/category/controller/CategoryController.java b/clokey-api/src/main/java/org/clokey/domain/category/controller/CategoryController.java index 8652f18e..97ae3885 100644 --- a/clokey-api/src/main/java/org/clokey/domain/category/controller/CategoryController.java +++ b/clokey-api/src/main/java/org/clokey/domain/category/controller/CategoryController.java @@ -14,14 +14,17 @@ @RestController @RequestMapping("/categories") @RequiredArgsConstructor -@Tag(name = "2. 카테고리 API", description = "카테고리 관련 API입니다.") +@Tag(name = "02. 카테고리 API", description = "카테고리 관련 API입니다.") @Validated public class CategoryController { private final CategoryService categoryService; @GetMapping - @Operation(summary = "카테고리 목록 조회", description = "카테고리 목록을 조회합니다.") + @Operation( + operationId = "Category_getAllCategories", + summary = "카테고리 목록 조회", + description = "카테고리 목록을 조회합니다.") public BaseResponse> getAllCategories() { List categories = categoryService.getCategoryList(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, categories); diff --git a/clokey-api/src/main/java/org/clokey/domain/cloth/controller/ClothController.java b/clokey-api/src/main/java/org/clokey/domain/cloth/controller/ClothController.java index bfe99e79..6b6c9d68 100644 --- a/clokey-api/src/main/java/org/clokey/domain/cloth/controller/ClothController.java +++ b/clokey-api/src/main/java/org/clokey/domain/cloth/controller/ClothController.java @@ -23,7 +23,7 @@ @RestController @RequestMapping("/clothes") @RequiredArgsConstructor -@Tag(name = "3. 옷 API", description = "옷 관련 API입니다.") +@Tag(name = "03. 옷 API", description = "옷 관련 API입니다.") @Validated public class ClothController { @@ -31,6 +31,7 @@ public class ClothController { @PostMapping("/images") @Operation( + operationId = "Cloth_getClothUploadPresignedUrl", summary = "옷 이미지 업로드용 presignedUrl 발급", description = "옷 이미지 업로드용 presignedUrl을 발급합니다.") public BaseResponse getClothUploadPresignedUrl( @@ -41,7 +42,7 @@ public BaseResponse getClothUploadPresignedUrl( } @PostMapping - @Operation(summary = "옷 생성", description = "새로운 옷을 생성합니다.") + @Operation(operationId = "Cloth_createClothes", summary = "옷 생성", description = "새로운 옷을 생성합니다.") public BaseResponse createClothes( @Valid @RequestBody ClothCreateRequests request) { ClothCreateResponse response = clothService.createClothes(request); @@ -49,7 +50,10 @@ public BaseResponse createClothes( } @GetMapping("/recommend") - @Operation(summary = "카테고리별 계절에 맞는 옷 조회", description = "카테고리별로 계절에 맞는 옷을 조회하는 API입니다.") + @Operation( + operationId = "Cloth_recommendCategoryClothes", + summary = "카테고리별 계절에 맞는 옷 조회", + description = "카테고리별로 계절에 맞는 옷을 조회하는 API입니다.") public BaseResponse> recommendCategoryClothes( @Parameter(description = "이전 페이지의 옷ID (첫 요청 시 생략)") @RequestParam(required = false) Long lastClothId, @@ -62,7 +66,10 @@ public BaseResponse> recommendCategory } @GetMapping - @Operation(summary = "옷 목록 조회", description = "옷장에서 옷 목록을 조회하는 API입니다.") + @Operation( + operationId = "Cloth_getClothes", + summary = "옷 목록 조회", + description = "옷장에서 옷 목록을 조회하는 API입니다.") public BaseResponse> getClothes( @Parameter(description = "이전 페이지의 옷 ID(첫 요청 시 생략)") @RequestParam(required = false) Long lastClothId, @@ -80,14 +87,17 @@ public BaseResponse> getClothes( } @GetMapping("/{clothId}") - @Operation(summary = "옷 상세 조회", description = "옷을 상세 조회하는 API입니다.") + @Operation( + operationId = "Cloth_getClothDetails", + summary = "옷 상세 조회", + description = "옷을 상세 조회하는 API입니다.") public BaseResponse getClothDetails(@PathVariable Long clothId) { ClothDetailsResponse response = clothService.getClothDetails(clothId); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); } @PatchMapping("/{clothId}") - @Operation(summary = "옷 수정", description = "옷을 수정하는 API입니다.") + @Operation(operationId = "Cloth_updateCloth", summary = "옷 수정", description = "옷을 수정하는 API입니다.") public BaseResponse updateCloth( @PathVariable Long clothId, @RequestBody @Valid ClothUpdateRequest request) { clothService.updateCloth(clothId, request); @@ -95,7 +105,7 @@ public BaseResponse updateCloth( } @DeleteMapping("/{clothId}") - @Operation(summary = "옷 삭제", description = "옷을 삭제합니다.") + @Operation(operationId = "Cloth_deleteCloth", summary = "옷 삭제", description = "옷을 삭제합니다.") public BaseResponse deleteCloth(@PathVariable Long clothId) { clothService.deleteCloth(clothId); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); diff --git a/clokey-api/src/main/java/org/clokey/domain/comment/controller/CommentController.java b/clokey-api/src/main/java/org/clokey/domain/comment/controller/CommentController.java index a557c862..98bfb213 100644 --- a/clokey-api/src/main/java/org/clokey/domain/comment/controller/CommentController.java +++ b/clokey-api/src/main/java/org/clokey/domain/comment/controller/CommentController.java @@ -22,14 +22,17 @@ @RestController @RequestMapping("/comments") @RequiredArgsConstructor -@Tag(name = "4. 댓글 API", description = "댓글 관련 API입니다.") +@Tag(name = "04. 댓글 API", description = "댓글 관련 API입니다.") @Validated public class CommentController { private final CommentService commentService; @PostMapping - @Operation(summary = "댓글 작성", description = "새로운 댓글을 작성합니다.") + @Operation( + operationId = "Comment_createComment", + summary = "댓글 작성", + description = "새로운 댓글을 작성합니다.") public BaseResponse createComment( @Valid @RequestBody CommentCreateRequest request) { CommentCreateResponse response = commentService.createComment(request); @@ -37,7 +40,7 @@ public BaseResponse createComment( } @PostMapping("/{commentId}/replies") - @Operation(summary = "대댓글 작성", description = "대댓글을 작성합니다.") + @Operation(operationId = "Comment_createReply", summary = "대댓글 작성", description = "대댓글을 작성합니다.") public BaseResponse createReply( @PathVariable Long commentId, @Valid @RequestBody CommentCreateRequest request) { CommentCreateResponse response = commentService.createReply(commentId, request); @@ -45,7 +48,7 @@ public BaseResponse createReply( } @GetMapping - @Operation(summary = "댓글 조회", description = "댓글을 조회합니다") + @Operation(operationId = "Comment_getComments", summary = "댓글 조회", description = "댓글을 조회합니다") public BaseResponse> getComments( @Parameter(description = "조회중인 기록의 ID") @RequestParam Long historyId, @Parameter(description = "이전 페이지의 마지막 댓글 ID (첫 요청 시 생략)") @@ -61,7 +64,7 @@ public BaseResponse> getComments( } @GetMapping("/{commentId}/replies") - @Operation(summary = "대댓글 조회", description = "대댓글을 조회합니다") + @Operation(operationId = "Comment_getReplies", summary = "대댓글 조회", description = "대댓글을 조회합니다") public BaseResponse> getReplies( @PathVariable Long commentId, @Parameter(description = "이전 페이지의 마지막 대댓글 ID (첫 요청 시 생략)") @@ -77,14 +80,20 @@ public BaseResponse> getReplies( } @DeleteMapping("/{commentId}") - @Operation(summary = "댓글 삭제 API", description = "댓글을 삭제합니다.") + @Operation( + operationId = "Comment_deleteComment", + summary = "댓글 삭제 API", + description = "댓글을 삭제합니다.") public BaseResponse deleteComment(@PathVariable Long commentId) { commentService.deleteComment(commentId); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); } @GetMapping("/my-comments") - @Operation(summary = "내가 작성한 댓글 조회 API", description = "내가 작성한 댓글을 조회합니다.") + @Operation( + operationId = "Comment_getMyComments", + summary = "내가 작성한 댓글 조회 API", + description = "내가 작성한 댓글을 조회합니다.") public BaseResponse> getMyComments( @Parameter(description = "이전 페이지의 마지막 기록 ID (첫 요청 시 생략)") @RequestParam(required = false) diff --git a/clokey-api/src/main/java/org/clokey/domain/coordinate/controller/CoordinateController.java b/clokey-api/src/main/java/org/clokey/domain/coordinate/controller/CoordinateController.java index 18bd1a5d..f726abca 100644 --- a/clokey-api/src/main/java/org/clokey/domain/coordinate/controller/CoordinateController.java +++ b/clokey-api/src/main/java/org/clokey/domain/coordinate/controller/CoordinateController.java @@ -23,14 +23,17 @@ @RestController @RequestMapping("/coordinate") @RequiredArgsConstructor -@Tag(name = "5. 코디 API", description = "코디 관련 API입니다.") +@Tag(name = "05. 코디 API", description = "코디 관련 API입니다.") @Validated public class CoordinateController { private final CoordinateService coordinateService; @PostMapping("/daily") - @Operation(summary = "오늘의 코디 생성", description = "홈화면에서 오늘의 코디를 생성하는 API입니다.") + @Operation( + operationId = "Coordinate_createDailyCoordinate", + summary = "오늘의 코디 생성", + description = "홈화면에서 오늘의 코디를 생성하는 API입니다.") public BaseResponse createDailyCoordinate( @Valid @RequestBody DailyCoordinateCreateRequest request) { CoordinateCreateResponse response = coordinateService.createDailyCoordinate(request); @@ -38,7 +41,10 @@ public BaseResponse createDailyCoordinate( } @PostMapping("/manual") - @Operation(summary = "코디 수동 생성", description = "코디 생성을 수동으로 하는 API입니다.") + @Operation( + operationId = "Coordinate_createCoordinateManual", + summary = "코디 수동 생성", + description = "코디 생성을 수동으로 하는 API입니다.") public BaseResponse createCoordinateManual( @Valid @RequestBody CoordinateManualCreateRequest request) { CoordinateCreateResponse response = coordinateService.createCoordinateManual(request); @@ -46,7 +52,10 @@ public BaseResponse createCoordinateManual( } @PostMapping("/auto") - @Operation(summary = "코디 자동 생성", description = "오늘의 코디를 통해서 코디를 생성하는 API입니다.") + @Operation( + operationId = "Coordinate_createCoordinateAuto", + summary = "코디 자동 생성", + description = "오늘의 코디를 통해서 코디를 생성하는 API입니다.") public BaseResponse createCoordinateAuto( @Valid @RequestBody CoordinateAutoCreateRequest request) { CoordinateCreateResponse response = coordinateService.createCoordinateAuto(request); @@ -54,7 +63,10 @@ public BaseResponse createCoordinateAuto( } @PatchMapping("/{coordinateId}") - @Operation(summary = "코디 수정", description = "코디를 수정하는 API입니다.") + @Operation( + operationId = "Coordinate_updateCoordinate", + summary = "코디 수정", + description = "코디를 수정하는 API입니다.") public BaseResponse updateCoordinate( @PathVariable Long coordinateId, @Valid @RequestBody CoordinateUpdateRequest request) { coordinateService.updateCoordinate(coordinateId, request); @@ -62,14 +74,20 @@ public BaseResponse updateCoordinate( } @DeleteMapping("/{coordinateId}") - @Operation(summary = "코디 삭제", description = "코디를 룩북에서 삭제하는 API입니다.") + @Operation( + operationId = "Coordinate_deleteCoordinate", + summary = "코디 삭제", + description = "코디를 룩북에서 삭제하는 API입니다.") public BaseResponse deleteCoordinate(@PathVariable Long coordinateId) { coordinateService.deleteCoordinate(coordinateId); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); } @GetMapping("/daily") - @Operation(summary = "과거 일일 코디 조회", description = "룩북 추가를 위해 과거 일일 코디를 조회하는 API입니다.") + @Operation( + operationId = "Coordinate_getDailyCoordinates", + summary = "과거 일일 코디 조회", + description = "룩북 추가를 위해 과거 일일 코디를 조회하는 API입니다.") public BaseResponse> getDailyCoordinates( @Parameter(description = "이전 페이지의 마지막 코디 ID (첫 요청 시 생략)") @RequestParam(required = false) @@ -84,7 +102,10 @@ public BaseResponse> getDailyCoordina } @GetMapping("/{coordinateId}/preview") - @Operation(summary = "코디 Preview 조회", description = "룩북에 존재하는 코디의 Preview를 조회하는 API입니다.") + @Operation( + operationId = "Coordinate_getCoordinatePreview", + summary = "코디 Preview 조회", + description = "룩북에 존재하는 코디의 Preview를 조회하는 API입니다.") public BaseResponse getCoordinatePreview( @PathVariable Long coordinateId) { CoordinatePreviewResponse response = coordinateService.getCoordinatePreview(coordinateId); @@ -92,7 +113,10 @@ public BaseResponse getCoordinatePreview( } @GetMapping("/{coordinateId}/details") - @Operation(summary = "코디 Details 조회", description = "룩북에 존재하는 코디의 Details를 조회하는 API입니다.") + @Operation( + operationId = "Coordinate_getCoordinateDetails", + summary = "코디 Details 조회", + description = "룩북에 존재하는 코디의 Details를 조회하는 API입니다.") public BaseResponse> getCoordinateDetails( @PathVariable Long coordinateId) { List response = @@ -101,14 +125,20 @@ public BaseResponse> getCoordinateDetails( } @PatchMapping("/{coordinateId}/like") - @Operation(summary = "코디 좋아요 토글", description = "룩북에 존재하는 코디에 좋아요를 토글하는 API입니다.") + @Operation( + operationId = "Coordinate_toggleCoordinateLike", + summary = "코디 좋아요 토글", + description = "룩북에 존재하는 코디에 좋아요를 토글하는 API입니다.") public BaseResponse toggleCoordinateLike(@PathVariable Long coordinateId) { coordinateService.toggleCoordinateLike(coordinateId); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); } @GetMapping("/my-favorites") - @Operation(summary = "나의 최애 코디 조회", description = "나의 최애 코디를 조회하는 API입니다.") + @Operation( + operationId = "Coordinate_getFavoriteCoordinates", + summary = "나의 최애 코디 조회", + description = "나의 최애 코디를 조회하는 API입니다.") public BaseResponse> getFavoriteCoordinates() { List response = coordinateService.getFavoriteCoordinates(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); diff --git a/clokey-api/src/main/java/org/clokey/domain/history/controller/HistoryController.java b/clokey-api/src/main/java/org/clokey/domain/history/controller/HistoryController.java index 11011c89..a252514b 100644 --- a/clokey-api/src/main/java/org/clokey/domain/history/controller/HistoryController.java +++ b/clokey-api/src/main/java/org/clokey/domain/history/controller/HistoryController.java @@ -18,14 +18,17 @@ @RestController @RequestMapping("/histories") @RequiredArgsConstructor -@Tag(name = "7. 기록 API", description = "기록 관련 API입니다.") +@Tag(name = "07. 기록 API", description = "기록 관련 API입니다.") @Validated public class HistoryController { private final HistoryService historyService; @PostMapping - @Operation(summary = "기록 생성", description = "새로운 기록을 생성합니다.") + @Operation( + operationId = "History_createHistory", + summary = "기록 생성", + description = "새로운 기록을 생성합니다.") public BaseResponse createHistory( @Valid @RequestBody HistoryCreateRequest request) { HistoryCreateResponse response = historyService.createHistory(request); @@ -33,7 +36,10 @@ public BaseResponse createHistory( } @PatchMapping("/{historyId}") - @Operation(summary = "기록 수정", description = "기록을 수정하는 API입니다") + @Operation( + operationId = "History_updateHistory", + summary = "기록 수정", + description = "기록을 수정하는 API입니다") public BaseResponse updateHistory( @PathVariable Long historyId, @Valid @RequestBody HistoryUpdateRequest request) { historyService.updateHistory(historyId, request); @@ -41,14 +47,20 @@ public BaseResponse updateHistory( } @GetMapping("/styles") - @Operation(summary = "스타일 목록 조회", description = "스타일 목록을 조회하는 API입니다. (기록 생성용)") + @Operation( + operationId = "History_getAllStyles", + summary = "스타일 목록 조회", + description = "스타일 목록을 조회하는 API입니다. (기록 생성용)") public BaseResponse getAllStyles() { StyleListResponse response = historyService.getAllStyles(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); } @GetMapping("/situations") - @Operation(summary = "상황 목록 조회", description = "상황 목록을 조회하는 API입니다. (기록 생성용)") + @Operation( + operationId = "History_getAllSituations", + summary = "상황 목록 조회", + description = "상황 목록을 조회하는 API입니다. (기록 생성용)") public BaseResponse getAllSituations() { SituationListResponse response = historyService.getAllSituations(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); diff --git a/clokey-api/src/main/java/org/clokey/domain/lookbook/controller/LookBookController.java b/clokey-api/src/main/java/org/clokey/domain/lookbook/controller/LookBookController.java index b49b3be7..16de168b 100644 --- a/clokey-api/src/main/java/org/clokey/domain/lookbook/controller/LookBookController.java +++ b/clokey-api/src/main/java/org/clokey/domain/lookbook/controller/LookBookController.java @@ -29,7 +29,10 @@ public class LookBookController { private final LookBookService lookBookService; @PostMapping() - @Operation(summary = "룩북 생성", description = "룩북을 생성하는 API입니다.") + @Operation( + operationId = "LookBook_createLookBook", + summary = "룩북 생성", + description = "룩북을 생성하는 API입니다.") public BaseResponse createLookBook( @Valid @RequestBody LookBookCreateRequest request) { LookBookCreateResponse response = lookBookService.createLookBook(request); @@ -37,7 +40,10 @@ public BaseResponse createLookBook( } @PatchMapping("/{lookBookId}") - @Operation(summary = "룩북 수정", description = "룩북을 수정하는 API입니다.") + @Operation( + operationId = "LookBook_updateLookBook", + summary = "룩북 수정", + description = "룩북을 수정하는 API입니다.") public BaseResponse updateLookBook( @PathVariable Long lookBookId, @Valid @RequestBody LookBookUpdateRequest request) { lookBookService.updateLookBook(lookBookId, request); @@ -45,14 +51,20 @@ public BaseResponse updateLookBook( } @DeleteMapping("/{lookBookId}") - @Operation(summary = "룩북 삭제", description = "룩북을 삭제하는 API입니다.") + @Operation( + operationId = "LookBook_deleteLookBook", + summary = "룩북 삭제", + description = "룩북을 삭제하는 API입니다.") public BaseResponse deleteLookBook(@PathVariable Long lookBookId) { lookBookService.deleteLookBook(lookBookId); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); } @GetMapping() - @Operation(summary = "룩북 전체 목록 조회", description = "룩북 전체 목록을 조회하는 API입니다.") + @Operation( + operationId = "LookBook_getLookBooks", + summary = "룩북 전체 목록 조회", + description = "룩북 전체 목록을 조회하는 API입니다.") public BaseResponse> getLookBooks( @Parameter(description = "이전 페이지의 마지막 룩북 ID (첫 요청 시 생략)") @RequestParam(required = false) @@ -67,7 +79,10 @@ public BaseResponse> getLookBooks( } @GetMapping("/{lookBookId}") - @Operation(summary = "개별 룩북 코디 목록 조회", description = "개별 룩북 내부의 코디들을 API입니다.") + @Operation( + operationId = "LookBook_getCoordinates", + summary = "개별 룩북 코디 목록 조회", + description = "개별 룩북 내부의 코디들을 API입니다.") public BaseResponse> getCoordinates( @PathVariable Long lookBookId, @Parameter(description = "이전 페이지의 마지막 코디 ID (첫 요청 시 생략)") diff --git a/clokey-api/src/main/java/org/clokey/domain/member/controller/MemberController.java b/clokey-api/src/main/java/org/clokey/domain/member/controller/MemberController.java index 1e519533..1f72be6f 100644 --- a/clokey-api/src/main/java/org/clokey/domain/member/controller/MemberController.java +++ b/clokey-api/src/main/java/org/clokey/domain/member/controller/MemberController.java @@ -27,14 +27,20 @@ public class MemberController { private final MemberService memberService; @PatchMapping - @Operation(summary = "프로필 수정", description = "프로필을 수정/추가 합니다.") + @Operation( + operationId = "Member_updateProfile", + summary = "프로필 수정", + description = "프로필을 수정/추가 합니다.") public BaseResponse updateProfile(@Valid @RequestBody ProfileUpdateRequest request) { memberService.updateProfile(request); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); } @PostMapping("/check-duplicate-id") - @Operation(summary = "아이디 중복확인", description = "클로키아이디 중복을 확인합니다.") + @Operation( + operationId = "Member_checkDuplicateClokeyId", + summary = "아이디 중복확인", + description = "클로키아이디 중복을 확인합니다.") public BaseResponse checkDuplicateClokeyId( @Valid @RequestBody DuplicatedIdCheckRequest request) { @@ -43,7 +49,10 @@ public BaseResponse checkDuplicateClokeyId( } @PostMapping("/follow") - @Operation(summary = "팔로우 API", description = "다른 사용자를 팔로우/취소하는 API입니다. 공개 계정에 팔로우시 팔로우 됩니다.") + @Operation( + operationId = "Member_toggleFollow", + summary = "팔로우 API", + description = "다른 사용자를 팔로우/취소하는 API입니다. 공개 계정에 팔로우시 팔로우 됩니다.") public BaseResponse toggleFollow(@RequestParam("userId") Long userId) { memberService.toggleFollow(userId); @@ -53,6 +62,7 @@ public BaseResponse toggleFollow(@RequestParam("userId") Long userId) { @PostMapping("/pending-follow") @Operation( + operationId = "Member_togglePendingFollow", summary = "팔로우 API", description = "다른 사용자를 팔로우/취소하는 API입니다. 비공개 계정에 팔로우시 요청이 들어갑니다.") public BaseResponse togglePendingFollow(@RequestParam("userId") Long userId) { @@ -62,14 +72,20 @@ public BaseResponse togglePendingFollow(@RequestParam("userId") Long userI } @PostMapping("/block/{memberId}") - @Operation(summary = "차단 토글 API", description = "차단 상태를 변경합니다.") + @Operation( + operationId = "Member_toggleBlockStatus", + summary = "차단 토글 API", + description = "차단 상태를 변경합니다.") public BaseResponse toggleBlockStatus(@PathVariable Long memberId) { memberService.toggleBlockStatus(memberId); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); } @GetMapping("/check-myself") - @Operation(summary = "본인인지 여부 확인", description = "클로키 아이디로 본인인지 확인합니다.") + @Operation( + operationId = "Member_checkIsMySelf", + summary = "본인인지 여부 확인", + description = "클로키 아이디로 본인인지 확인합니다.") public BaseResponse checkIsMySelf( @Parameter(description = "본인인지 확인할 클로키 ID") @RequestParam("clokeyId") String clokeyId) { @@ -78,7 +94,10 @@ public BaseResponse checkIsMySelf( } @GetMapping("/blocks") - @Operation(summary = "차단한 멤버 조회", description = "사용자가 차단한 모든 멤버들을 조회합니다.") + @Operation( + operationId = "Member_getBlockedMembers", + summary = "차단한 멤버 조회", + description = "사용자가 차단한 모든 멤버들을 조회합니다.") public BaseResponse> getBlockedMembers( @Parameter(description = "이전 페이지의 마지막 Block ID (첫 요청 시 생략)") @RequestParam(required = false) @@ -93,7 +112,10 @@ public BaseResponse> getBlockedMembers( } @GetMapping("follows") - @Operation(summary = "팔로잉/팔로워 멤버 조회", description = "해당 사용자의 모든 팔로잉 OR 팔로워들을 조회합니다.") + @Operation( + operationId = "Member_getFollows", + summary = "팔로잉/팔로워 멤버 조회", + description = "해당 사용자의 모든 팔로잉 OR 팔로워들을 조회합니다.") public BaseResponse> getFollows( @Parameter(description = "목록을 조회할 멤버의 Member ID") @RequestParam Long memberId, @Parameter(description = "이전 페이지의 마지막 Follow ID (첫 요청 시 생략)") @@ -107,7 +129,10 @@ public BaseResponse> getFollows( } @GetMapping("{memberId}") - @Operation(summary = "회원 조회 API", description = "입력받은 codive ID에 해당하는 회원의 정보를 조회합니다.") + @Operation( + operationId = "Member_getMemberInfo", + summary = "회원 조회 API", + description = "입력받은 codive ID에 해당하는 회원의 정보를 조회합니다.") public BaseResponse getMemberInfo(@PathVariable Long memberId) { return BaseResponse.onSuccess( GlobalBaseSuccessCode.OK, memberService.getMemberInfo(memberId)); diff --git a/clokey-api/src/main/java/org/clokey/domain/notification/controller/CodiveNotificationController.java b/clokey-api/src/main/java/org/clokey/domain/notification/controller/CodiveNotificationController.java index dc37ddee..08c00f46 100644 --- a/clokey-api/src/main/java/org/clokey/domain/notification/controller/CodiveNotificationController.java +++ b/clokey-api/src/main/java/org/clokey/domain/notification/controller/CodiveNotificationController.java @@ -26,7 +26,10 @@ public class CodiveNotificationController { private final CodiveNotificationService codiveNotificationService; @GetMapping - @Operation(summary = "알림 목록 조회", description = "회원의 알림 목록을 조회합니다") + @Operation( + operationId = "Notification_getNotificationList", + summary = "알림 목록 조회", + description = "회원의 알림 목록을 조회합니다") public BaseResponse> getNotificationList( @Parameter(description = "이전 페이지의 마지막 CodiveNotification ID (첫 요청 시 생략)") @RequestParam(required = false) @@ -38,7 +41,10 @@ public BaseResponse> getNotificationList } @GetMapping("not-read-exist") - @Operation(summary = "안읽은 알림 존재 유무 확인", description = "안읽음 상태인 알림 존재 유무를 확인합니다.") + @Operation( + operationId = "Notification_existsUnreadNotification", + summary = "안읽은 알림 존재 유무 확인", + description = "안읽음 상태인 알림 존재 유무를 확인합니다.") public BaseResponse existsUnreadNotification() { return BaseResponse.onSuccess( GlobalBaseSuccessCode.OK, codiveNotificationService.existsUnreadNotification()); diff --git a/clokey-api/src/main/java/org/clokey/domain/report/controller/ReportController.java b/clokey-api/src/main/java/org/clokey/domain/report/controller/ReportController.java index 25a54d8f..79e5912f 100644 --- a/clokey-api/src/main/java/org/clokey/domain/report/controller/ReportController.java +++ b/clokey-api/src/main/java/org/clokey/domain/report/controller/ReportController.java @@ -22,7 +22,10 @@ public class ReportController { private final ReportService reportService; @PostMapping - @Operation(summary = "신고 생성", description = "신고를 생성합니다.") + @Operation( + operationId = "Report_createNewReport", + summary = "신고 생성", + description = "신고를 생성합니다.") public BaseResponse createNewReport( @Valid @RequestBody ReportCreateRequest reportCreatRequest) { ReportCreateResponse response = reportService.createReport(reportCreatRequest); diff --git a/clokey-api/src/main/java/org/clokey/domain/statistics/controller/StatisticsController.java b/clokey-api/src/main/java/org/clokey/domain/statistics/controller/StatisticsController.java index ea7181d5..3968a103 100644 --- a/clokey-api/src/main/java/org/clokey/domain/statistics/controller/StatisticsController.java +++ b/clokey-api/src/main/java/org/clokey/domain/statistics/controller/StatisticsController.java @@ -29,14 +29,20 @@ public class StatisticsController { private final StatisticsService statisticsService; @GetMapping("/check-conditions") - @Operation(summary = "통계 최소 조건 확인", description = "통계 집계가 가능한 최소 조건을 확인하는 API입니다.") + @Operation( + operationId = "Statistics_checkStatisticsCondition", + summary = "통계 최소 조건 확인", + description = "통계 집계가 가능한 최소 조건을 확인하는 API입니다.") public BaseResponse checkStatisticsCondition() { StatisticsCheckConditionResponse response = statisticsService.checkStatisticsCondition(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); } @GetMapping("/favorite-category-items") - @Operation(summary = "카테고리별 최애 아이템 조회", description = "카테고리별 아이템의 개수와 점유율을 조회하는 API입니다..") + @Operation( + operationId = "Statistics_getFavoriteCategoryItems", + summary = "카테고리별 최애 아이템 조회", + description = "카테고리별 아이템의 개수와 점유율을 조회하는 API입니다..") public BaseResponse getFavoriteCategoryItems( @Parameter(description = "카테고리 ID") @RequestParam Long categoryId) { FavoriteCategoryItemsResponse response = @@ -45,7 +51,10 @@ public BaseResponse getFavoriteCategoryItems( } @GetMapping("/favorite-items") - @Operation(summary = "옷장 아이템 통계 조회", description = "옷장 아이템 통계를 조회합니다.") + @Operation( + operationId = "Statistics_getFavoriteItems", + summary = "옷장 아이템 통계 조회", + description = "옷장 아이템 통계를 조회합니다.") public BaseResponse getFavoriteItems() { FavoriteItemsResponse response = statisticsService.getFavoriteItems(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); @@ -53,6 +62,7 @@ public BaseResponse getFavoriteItems() { @GetMapping("/closet-utilization") @Operation( + operationId = "Statistics_getClosetUtilization", summary = "옷장 활용도 조회", description = "시즌별 옷장 활용도를 조회합니다. HistoryClothTag에 태그되었거나 Daily Coordinate에 포함된 옷을 활용된 것으로 간주합니다.") diff --git a/clokey-api/src/main/java/org/clokey/domain/term/controller/TermController.java b/clokey-api/src/main/java/org/clokey/domain/term/controller/TermController.java index 72ac0254..def3bd80 100644 --- a/clokey-api/src/main/java/org/clokey/domain/term/controller/TermController.java +++ b/clokey-api/src/main/java/org/clokey/domain/term/controller/TermController.java @@ -21,28 +21,34 @@ public class TermController { private final TermService termService; @GetMapping - @Operation(summary = "전체 약관 조회", description = "전체 약관 조회 API") + @Operation(operationId = "Term_getTerms", summary = "전체 약관 조회", description = "전체 약관 조회 API") public BaseResponse getTerms() { TermListResponse response = termService.getTerms(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); } @PostMapping - @Operation(summary = "약관 동의", description = "약관 동의 정보를 설정합니다.") + @Operation(operationId = "Term_agreeTerm", summary = "약관 동의", description = "약관 동의 정보를 설정합니다.") public BaseResponse agreeTerm(@Valid @RequestBody TermAgreeRequest request) { termService.agreeTerm(request); return BaseResponse.onSuccess(GlobalBaseSuccessCode.NO_CONTENT, null); } @GetMapping("/my-optional") - @Operation(summary = "나의 선택 약관 조회", description = "나의 선택 약관 정보 조회 API") + @Operation( + operationId = "Term_getMyOptionalTerms", + summary = "나의 선택 약관 조회", + description = "나의 선택 약관 정보 조회 API") public BaseResponse getMyOptionalTerms() { MyOptionalTermResponse response = termService.getMyOptionalTerms(); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, response); } @PatchMapping("/my-optional-toggle") - @Operation(summary = "나의 선택 약관 수정", description = "나의 선택 약관 수정 API") + @Operation( + operationId = "Term_toggleMyOptionalTerms", + summary = "나의 선택 약관 수정", + description = "나의 선택 약관 수정 API") public BaseResponse toggleMyOptionalTerms(@RequestParam Long termId) { termService.toggleMyOptionalTerms(termId); return BaseResponse.onSuccess(GlobalBaseSuccessCode.OK, null); diff --git a/clokey-api/src/main/resources/application-prod.yml b/clokey-api/src/main/resources/application-prod.yml index 8ed0a788..0fb232a0 100644 --- a/clokey-api/src/main/resources/application-prod.yml +++ b/clokey-api/src/main/resources/application-prod.yml @@ -74,3 +74,4 @@ aws: firebase: credentials-path: ${FIREBASE_CREDENTIALS_PATH} +