88import com .back .web7_9_codecrete_be .domain .plans .dto .response .PlanResponse ;
99import com .back .web7_9_codecrete_be .domain .plans .service .PlanService ;
1010import com .back .web7_9_codecrete_be .global .rsData .RsData ;
11+ import io .swagger .v3 .oas .annotations .Operation ;
12+ import io .swagger .v3 .oas .annotations .tags .Tag ;
1113import jakarta .validation .Valid ;
1214import lombok .RequiredArgsConstructor ;
1315import org .springframework .http .HttpStatus ;
1921@ RestController
2022@ RequestMapping ("/api/v1/plans" )
2123@ RequiredArgsConstructor
24+ @ Tag (name = "Plans" , description = "계획(Plans) 관련 API" )
2225public class PlanController {
2326
2427 private final PlanService planService ;
@@ -29,6 +32,7 @@ public class PlanController {
2932 * @return 계획 목록 (200 OK)
3033 */
3134 @ GetMapping ("/list" )
35+ @ Operation (summary = "계획 목록 조회" , description = "사용자의 계획 목록을 조회합니다." )
3236 public RsData <List <PlanListResponse >> getPlanList (@ RequestParam Long userId ) {
3337 List <PlanListResponse > planList = planService .getPlanList (userId );
3438 return RsData .success ("계획 목록 조회 성공" , planList );
@@ -41,6 +45,7 @@ public RsData<List<PlanListResponse>> getPlanList(@RequestParam Long userId) {
4145 * @return 계획 상세 정보 (200 OK)
4246 */
4347 @ GetMapping ("/{planId}" )
48+ @ Operation (summary = "계획 상세 조회" , description = "특정 계획의 상세 정보를 조회합니다." )
4449 public RsData <PlanDetailResponse > getPlanDetail (@ PathVariable Long planId ,
4550 @ RequestParam Long userId ) {
4651 PlanDetailResponse planDetail = planService .getPlanDetail (planId , userId );
@@ -55,6 +60,7 @@ public RsData<PlanDetailResponse> getPlanDetail(@PathVariable Long planId,
5560 * @return 생성된 계획 정보 (201 Created)
5661 */
5762 @ PostMapping ("/{concertId}" )
63+ @ Operation (summary = "계획 생성" , description = "새로운 계획을 생성합니다." )
5864 public RsData <PlanResponse > createPlan (
5965 @ PathVariable Long concertId ,
6066 @ Valid @ RequestBody PlanAddRequest request ) {
@@ -70,6 +76,7 @@ public RsData<PlanResponse> createPlan(
7076 * @return 수정된 계획 정보 (200 OK)
7177 */
7278 @ PatchMapping ("/update/{planId}" )
79+ @ Operation (summary = "계획 수정" , description = "기존 계획의 정보를 수정합니다." )
7380 public RsData <PlanResponse > updatePlan (
7481 @ PathVariable Long planId ,
7582 @ Valid @ RequestBody PlanUpdateRequest request ) {
@@ -84,6 +91,7 @@ public RsData<PlanResponse> updatePlan(
8491 * @return 삭제된 계획 ID (200 OK)
8592 */
8693 @ DeleteMapping ("/delete/{planId}" )
94+ @ Operation (summary = "계획 삭제" , description = "기존 계획을 삭제합니다." )
8795 public RsData <PlanDeleteResponse > deletePlan (@ PathVariable Long planId ) {
8896 PlanDeleteResponse deleteResponse = planService .deletePlan (planId );
8997 return RsData .success ("계획 삭제 성공" , deleteResponse );
0 commit comments