From 0653d0961b9934dc2602ba4eaab4c6e13cd5cd65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=AF=BC=EC=B0=AC=EA=B8=B0?= Date: Tue, 17 Sep 2024 18:52:42 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=8A=A4=EC=9B=A8=EA=B1=B0=20API=20?= =?UTF-8?q?=EC=9D=91=EB=8B=B5=20status=20code=20=EB=B3=80=EA=B2=BD=20(#170?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../show/controller/UserShowController.java | 20 ++++++++++++++++--- .../example/controller/UserController.java | 15 ++++++++++++-- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/app/api/show-api/src/main/java/com/example/show/controller/UserShowController.java b/app/api/show-api/src/main/java/com/example/show/controller/UserShowController.java index d7517433..f8712602 100644 --- a/app/api/show-api/src/main/java/com/example/show/controller/UserShowController.java +++ b/app/api/show-api/src/main/java/com/example/show/controller/UserShowController.java @@ -14,6 +14,7 @@ import com.example.show.service.dto.request.ShowInterestServiceRequest; import com.example.show.service.dto.request.ShowUninterestedServiceRequest; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import java.time.LocalDateTime; @@ -42,7 +43,12 @@ public class UserShowController { private final UserShowService userShowService; @PostMapping("/{showId}/interests") - @Operation(summary = "공연 관심 등록") + @Operation( + summary = "공연 관심 등록", + responses = { + @ApiResponse(responseCode = "204", description = "No Content") + } + ) public ResponseEntity interest( @PathVariable("showId") UUID showId, @AuthenticationPrincipal AuthenticatedInfo info @@ -57,7 +63,12 @@ public ResponseEntity interest( } @PostMapping("/{showId}/uninterested") - @Operation(summary = "공연 관심 취소") + @Operation( + summary = "공연 관심 취소", + responses = { + @ApiResponse(responseCode = "204", description = "No Content") + } + ) public ResponseEntity uninterested( @PathVariable("showId") UUID showId, @AuthenticationPrincipal AuthenticatedInfo info @@ -108,7 +119,10 @@ public ResponseEntity getNumberOfInterestShow( @PostMapping("/{showId}/alert") @Operation( summary = "공연 티켓팅 알림 등록 / 취소", - description = "요청한 알람 시간으로 기존 내용을 덮어쓴다." + description = "요청한 알람 시간으로 기존 내용을 덮어쓴다.", + responses = { + @ApiResponse(responseCode = "204", description = "No Content") + } ) public ResponseEntity alert( @AuthenticationPrincipal AuthenticatedInfo info, diff --git a/app/api/user-api/src/main/java/org/example/controller/UserController.java b/app/api/user-api/src/main/java/org/example/controller/UserController.java index 01c080ca..91d199df 100644 --- a/app/api/user-api/src/main/java/org/example/controller/UserController.java +++ b/app/api/user-api/src/main/java/org/example/controller/UserController.java @@ -1,6 +1,7 @@ package org.example.controller; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; @@ -41,7 +42,12 @@ public ResponseEntity signUp(@Valid @RequestBody LoginApiReque } @PostMapping("/logout") - @Operation(summary = "로그아웃") + @Operation( + summary = "로그아웃", + responses = { + @ApiResponse(responseCode = "204", description = "No Content") + } + ) public ResponseEntity logout( @AuthenticationPrincipal AuthenticatedInfo info ) { @@ -50,7 +56,12 @@ public ResponseEntity logout( } @PostMapping("/withdrawal") - @Operation(summary = "회원탈퇴") + @Operation( + summary = "회원탈퇴", + responses = { + @ApiResponse(responseCode = "204", description = "No Content") + } + ) public ResponseEntity withdraw( @AuthenticationPrincipal AuthenticatedInfo info ) {