Skip to content

Commit

Permalink
fix: 스웨거 API 응답 status code 변경 (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
devmizz authored Sep 17, 2024
1 parent ca06aba commit f3b343e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Void> interest(
@PathVariable("showId") UUID showId,
@AuthenticationPrincipal AuthenticatedInfo info
Expand All @@ -57,7 +63,12 @@ public ResponseEntity<Void> interest(
}

@PostMapping("/{showId}/uninterested")
@Operation(summary = "공연 관심 취소")
@Operation(
summary = "공연 관심 취소",
responses = {
@ApiResponse(responseCode = "204", description = "No Content")
}
)
public ResponseEntity<Void> uninterested(
@PathVariable("showId") UUID showId,
@AuthenticationPrincipal AuthenticatedInfo info
Expand Down Expand Up @@ -108,7 +119,10 @@ public ResponseEntity<NumberOfInterestShowApiResponse> getNumberOfInterestShow(
@PostMapping("/{showId}/alert")
@Operation(
summary = "공연 티켓팅 알림 등록 / 취소",
description = "요청한 알람 시간으로 기존 내용을 덮어쓴다."
description = "요청한 알람 시간으로 기존 내용을 덮어쓴다.",
responses = {
@ApiResponse(responseCode = "204", description = "No Content")
}
)
public ResponseEntity<Void> alert(
@AuthenticationPrincipal AuthenticatedInfo info,
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -41,7 +42,12 @@ public ResponseEntity<LoginApiResponse> signUp(@Valid @RequestBody LoginApiReque
}

@PostMapping("/logout")
@Operation(summary = "로그아웃")
@Operation(
summary = "로그아웃",
responses = {
@ApiResponse(responseCode = "204", description = "No Content")
}
)
public ResponseEntity<Void> logout(
@AuthenticationPrincipal AuthenticatedInfo info
) {
Expand All @@ -50,7 +56,12 @@ public ResponseEntity<Void> logout(
}

@PostMapping("/withdrawal")
@Operation(summary = "회원탈퇴")
@Operation(
summary = "회원탈퇴",
responses = {
@ApiResponse(responseCode = "204", description = "No Content")
}
)
public ResponseEntity<Void> withdraw(
@AuthenticationPrincipal AuthenticatedInfo info
) {
Expand Down

0 comments on commit f3b343e

Please sign in to comment.