diff --git a/src/main/java/com/umc/dream/controller/DreamController.java b/src/main/java/com/umc/dream/controller/DreamController.java index 0f711f9..31c5652 100644 --- a/src/main/java/com/umc/dream/controller/DreamController.java +++ b/src/main/java/com/umc/dream/controller/DreamController.java @@ -7,6 +7,9 @@ import com.umc.dream.domain.Follow; import com.umc.dream.dto.*; import com.umc.dream.service.DreamService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -19,6 +22,10 @@ public class DreamController { private DreamService dreamService; @PostMapping("/diary") + @Operation(summary = "꿈 일기 생성 API", description = "꿈 일기 생성 API입니다") + @Parameters({ + @Parameter(name = "dreamRequestDto", description = "상세 필드는 노션 API 명세를 참고!"), + }) public ApiResponse createDream(@RequestBody DreamRequestDto dreamRequestDto) { Dream dream = dreamService.createDream(dreamRequestDto); AddDreamResponseDto addDreamResponseDto = DreamConverter.toAddDreamResponse(dream); @@ -26,6 +33,10 @@ public ApiResponse createDream(@RequestBody DreamRequestDto } @GetMapping("/diary/{user_id}") + @Operation(summary = "내 꿈 일기 목록 API", description = "내 꿈 일기 목록 조회 API입니다") + @Parameters({ + @Parameter(name = "user_id", description = "꿈 일기 목록을 조회하고자하는 사용자의 pk"), + }) private ApiResponse> GetDream(@RequestParam Long user_id) { List getDreamResponseDtos = dreamService.getDream(user_id); return ApiResponse.onSuccess(getDreamResponseDtos); diff --git a/src/main/java/com/umc/dream/controller/FollowController.java b/src/main/java/com/umc/dream/controller/FollowController.java index 09557f4..0856db2 100644 --- a/src/main/java/com/umc/dream/controller/FollowController.java +++ b/src/main/java/com/umc/dream/controller/FollowController.java @@ -7,6 +7,9 @@ import com.umc.dream.dto.FollowResponseDto; import com.umc.dream.dto.ViewFollowResponseDto; import com.umc.dream.service.FollowService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -19,6 +22,10 @@ public class FollowController { private final FollowService followService; @PostMapping("/user/follow") + @Operation(summary = "친구 추가(팔로우) API", description = "친구 추가 API입니다") + @Parameters({ + @Parameter(name = "followRequestDto", description = "followerId(팔로우 하는 사람의 pk)와 acceptorId(팔로우 당하는 사람의 pk)를 담고있는 DTO 객체"), + }) public ApiResponse follow(@RequestBody FollowRequestDto followRequestDto) { Follow f = followService.follow(followRequestDto); FollowResponseDto followResponseDto = FollowConverter.toFollowResponse(f); @@ -26,12 +33,20 @@ public ApiResponse follow(@RequestBody FollowRequestDto follo } @DeleteMapping("/user/followCancel") + @Operation(summary = "친구 삭제(팔로우 취소) API", description = "친구 삭제 API입니다") + @Parameters({ + @Parameter(name = "followRequestDto", description = "followerId(팔로우 하는 사람의 pk)와 acceptorId(팔로우 당하는 사람의 pk)를 담고있는 DTO 객체"), + }) public ApiResponse followCancel(@RequestBody FollowRequestDto followRequestDto) { followService.followCancel(followRequestDto); return ApiResponse.onSuccess("팔로우 취소됨"); } @GetMapping("/user/{user_id}/following") + @Operation(summary = "친구 목록 조회 API", description = "친구 목록 조회 API입니다") + @Parameters({ + @Parameter(name = "user_id", description = "친구 목록을 조회하고자하는 사용자의 pk"), + }) public ApiResponse> viewFollowings(@PathVariable Long user_id) { List viewFollowResponseDtos = followService.viewFollowings(user_id); return ApiResponse.onSuccess(viewFollowResponseDtos);