From 422f336fb29814d353692e7eaa83d708998c9728 Mon Sep 17 00:00:00 2001 From: WonyuChoi Date: Fri, 19 Jul 2024 20:26:02 +0900 Subject: [PATCH] =?UTF-8?q?FLASH-173=20feat:=20problem=20API=20=EC=8A=A4?= =?UTF-8?q?=EC=9B=A8=EA=B1=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../climbing/problem/ui/ProblemController.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/com/first/flash/climbing/problem/ui/ProblemController.java b/src/main/java/com/first/flash/climbing/problem/ui/ProblemController.java index a2534469..64af43f3 100644 --- a/src/main/java/com/first/flash/climbing/problem/ui/ProblemController.java +++ b/src/main/java/com/first/flash/climbing/problem/ui/ProblemController.java @@ -6,6 +6,9 @@ import com.first.flash.climbing.problem.application.dto.ProblemDetailResponseDto; import com.first.flash.climbing.problem.application.dto.ProblemsResponseDto; import com.first.flash.climbing.problem.domain.dto.ProblemCreateRequestDto; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import java.util.List; import java.util.UUID; import lombok.RequiredArgsConstructor; @@ -28,6 +31,10 @@ public class ProblemController { private final ProblemsSaveService problemsSaveService; private final ProblemReadService problemReadService; + @Operation(summary = "문제 저장", description = "특정 섹터에 문제 저장") + @ApiResponses(value = { + @ApiResponse(responseCode = "201", description = "성공적으로 문제 저장함"), + }) @PostMapping("/gyms/{gymId}/sectors/{sectorId}/problems") public ResponseEntity saveProblems( @PathVariable("gymId") final Long gymId, @@ -37,6 +44,10 @@ public ResponseEntity saveProblems( .body(problemsSaveService.saveProblems(gymId, sectorId, requestDto)); } + @Operation(summary = "문제 여러건 조회", description = "문제 필터링, 정렬, 페이지네이션 후 여러건 조회") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공적으로 문제 조회"), + }) @GetMapping("/gyms/{gymId}/problems") public ResponseEntity findAllProblems( @PathVariable final Long gymId, @@ -51,6 +62,10 @@ public ResponseEntity findAllProblems( hasSolution)); } + @Operation(summary = "문제 단건 조회", description = "특정 문제의 정보 조회") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공적으로 문제 정보 조회함"), + }) @GetMapping("/problems/{problemId}") public ResponseEntity findProblemById( @PathVariable final UUID problemId) {