Skip to content

Commit

Permalink
fix: swagger 에러 표기 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yooooonshine committed Aug 7, 2024
1 parent 4204c1a commit 3e69afd
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public class MidPointController {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import middle_point_search.backend.common.dto.BaseResponse;
import middle_point_search.backend.common.dto.DataResponse;
import middle_point_search.backend.common.dto.ErrorResponse;
import middle_point_search.backend.common.util.MemberLoader;
import middle_point_search.backend.domains.member.domain.Member;
import middle_point_search.backend.domains.place.dto.PlaceDTO.PlaceFindResponse;
Expand Down Expand Up @@ -62,7 +65,8 @@ public class PlaceController {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -102,7 +106,8 @@ public ResponseEntity<BaseResponse> placeSaveOrUpdate(@RequestBody @Valid PlaceS
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -143,7 +148,8 @@ public ResponseEntity<BaseResponse> placesSaveOrUpdateBySelf(@RequestBody @Valid
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -182,7 +188,8 @@ public ResponseEntity<DataResponse<PlaceFindResponse>> placeFind() {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public class PlaceVoteRoomController {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -131,7 +132,8 @@ public ResponseEntity<DataResponse<PlaceVoteRoomCreateResponse>> placeVoteRoomCr
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -178,7 +180,8 @@ public ResponseEntity<DataResponse<PlaceVoteRoomCreateResponse>> placeVoteRoomRe
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -234,7 +237,8 @@ public ResponseEntity<DataResponse<PlaceVoteInfoResponse>> placeVoteRoomGet() {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -291,7 +295,8 @@ public ResponseEntity<?> vote(@RequestBody @Valid PlaceVoteRequest request) {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -333,7 +338,8 @@ public ResponseEntity<?> voteUpdate(@RequestBody @Valid PlaceVoteRequest request
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -379,7 +385,8 @@ public ResponseEntity<DataResponse<Boolean>> placeVoteRoomHas() {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public class RecommendPlaceController {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public ResponseEntity<DataResponse<RoomExistenceCheckResponse>> roomExistenceChe
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ public ResponseEntity<DataResponse<TimeVoteRoomCreateResponse>> timeVoteRoomCrea
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -182,7 +183,8 @@ public ResponseEntity<DataResponse<TimeVoteRoomCreateResponse>> timeVoteRoomRecr
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -235,7 +237,8 @@ public ResponseEntity<?> vote(@RequestBody @Valid TimeVoteRoomVoteRequest reques
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -278,7 +281,8 @@ public ResponseEntity<?> voteUpdate(@RequestBody @Valid TimeVoteRoomVoteRequest
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -325,7 +329,8 @@ public ResponseEntity<DataResponse<Boolean>> timeVoteRoomHas() {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
Expand Down Expand Up @@ -373,7 +378,8 @@ public ResponseEntity<DataResponse<Boolean>> votedHas() {
),
@ApiResponse(
responseCode = "422",
description = "방의 타입이 일치하지 않습니다"
description = "방의 타입이 일치하지 않습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}

Expand Down

0 comments on commit 3e69afd

Please sign in to comment.