77import boombimapi .domain .favorite .dto .response .AddFavoriteResponse ;
88import boombimapi .domain .favorite .dto .response .GetFavoriteResponse ;
99import boombimapi .global .response .BaseResponse ;
10+ import io .swagger .v3 .oas .annotations .Operation ;
11+ import io .swagger .v3 .oas .annotations .responses .ApiResponse ;
12+ import io .swagger .v3 .oas .annotations .responses .ApiResponses ;
13+ import io .swagger .v3 .oas .annotations .tags .Tag ;
1014import java .util .List ;
1115import lombok .RequiredArgsConstructor ;
1216import org .springframework .http .HttpStatus ;
2327@ RestController
2428@ RequiredArgsConstructor
2529@ RequestMapping ("/favorite" )
30+ @ Tag (name = "Favorite" , description = "사용자 즐겨찾기 관련 API" )
2631public class FavoriteController {
2732
2833 private final FavoriteService favoriteService ;
2934
35+ @ Operation (summary = "즐겨찾기 추가" , description = "해당 장소를 즐겨찾기에 추가합니다." )
36+ @ ApiResponses (value = {
37+ @ ApiResponse (responseCode = "200" , description = "즐겨찾기 추가 성공" )
38+ })
3039 @ PostMapping
3140 public ResponseEntity <BaseResponse <AddFavoriteResponse >> addFavorite (
3241 @ AuthenticationPrincipal String memberId ,
@@ -41,6 +50,10 @@ public ResponseEntity<BaseResponse<AddFavoriteResponse>> addFavorite(
4150 );
4251 }
4352
53+ @ Operation (summary = "즐겨찾기 삭제" , description = "해당 장소를 즐겨찾기에서 삭제합니다." )
54+ @ ApiResponses (value = {
55+ @ ApiResponse (responseCode = "200" , description = "즐겨찾기 삭제 성공" )
56+ })
4457 @ DeleteMapping
4558 public ResponseEntity <BaseResponse <Void >> deleteFavorite (
4659 @ AuthenticationPrincipal String memberId ,
@@ -57,6 +70,10 @@ public ResponseEntity<BaseResponse<Void>> deleteFavorite(
5770 );
5871 }
5972
73+ @ Operation (summary = "즐겨찾기 조회" , description = "사용자가 즐겨찾기한 장소들의 최신 혼잡도를 조회합니다." )
74+ @ ApiResponses (value = {
75+ @ ApiResponse (responseCode = "200" , description = "사용자 즐겨찾기 최신 혼잡도 조회 성공" )
76+ })
6077 @ GetMapping
6178 public ResponseEntity <BaseResponse <List <GetFavoriteResponse >>> getFavorites (
6279 @ AuthenticationPrincipal String memberId
0 commit comments