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) {