From a3ca4fc1524786511011f40fc7ea337ca1063344 Mon Sep 17 00:00:00 2001 From: shimbaa Date: Tue, 15 Oct 2024 16:46:03 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20swagger=20=EC=84=A4=EB=AA=85=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybuddyguard/weight/contoller/WeightController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/be/src/main/java/buddyguard/mybuddyguard/weight/contoller/WeightController.java b/be/src/main/java/buddyguard/mybuddyguard/weight/contoller/WeightController.java index 6fd779be..9a5a25af 100644 --- a/be/src/main/java/buddyguard/mybuddyguard/weight/contoller/WeightController.java +++ b/be/src/main/java/buddyguard/mybuddyguard/weight/contoller/WeightController.java @@ -4,6 +4,7 @@ import buddyguard.mybuddyguard.weight.contoller.response.WeightResponse; import buddyguard.mybuddyguard.weight.contoller.request.WeightUpdateRequest; import buddyguard.mybuddyguard.weight.service.WeightService; +import io.swagger.v3.oas.annotations.Operation; import jakarta.validation.Valid; import java.util.List; import lombok.RequiredArgsConstructor; @@ -25,6 +26,7 @@ public class WeightController { private final WeightService weightService; + @Operation(summary = "해당 id pet의 모든 체중 기록 조회") @GetMapping("/{petId}") public ResponseEntity> getAllWeightRecords( @PathVariable("petId") Long petId) { @@ -33,6 +35,7 @@ public ResponseEntity> getAllWeightRecords( return ResponseEntity.ok(responses); } + @Operation(summary = "체중 단일 조회", description = "pet id는 체중이 해당 pet의 기록이 맞는지 검증 위해 쓰임.") @GetMapping("/{petId}/detail/{id}") public ResponseEntity getDetailWeightRecord( @PathVariable("petId") Long petId, @@ -42,6 +45,7 @@ public ResponseEntity getDetailWeightRecord( return ResponseEntity.ok(response); } + @Operation(summary = "체중 기록 생성") @PostMapping public ResponseEntity createNewWeightRecord(@RequestBody @Valid WeightCreateRequest request) { @@ -49,6 +53,7 @@ public ResponseEntity createNewWeightRecord(@RequestBody @Valid WeightCrea return new ResponseEntity<>(HttpStatus.CREATED); } + @Operation(summary = "체중 기록 수정", description = "pet id는 체중이 해당 pet의 기록이 맞는지 검증 위해 쓰임.") @PatchMapping("/{petId}/detail/{id}") public ResponseEntity updateWeightRecord( @PathVariable("petId") Long petId, @@ -60,6 +65,7 @@ public ResponseEntity updateWeightRecord( return new ResponseEntity<>(HttpStatus.OK); } + @Operation(summary = "체중 기록 삭제", description = "pet id는 체중이 해당 pet의 기록이 맞는지 검증 위해 쓰임.") @DeleteMapping("/{petId}/detail/{id}") public ResponseEntity deleteWeightRecord( @PathVariable("petId") Long petId,