From f9a882822699bba1e1bfe4d8aa5ee3690bc2d5f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9B=90=EA=B2=BD?= <148550522+kwoo28@users.noreply.github.com> Date: Wed, 4 Dec 2024 23:39:52 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20PUT/v2/timetables/lecture=20=EA=B2=80?= =?UTF-8?q?=EC=A6=9D=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80=20(#1117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: TimetableLectureUpdateRequest List필드 검증 어노테이션 추가 * fix: Integer id 검증 추가 및 로직 수정 --------- Co-authored-by: 김원경 --- .../dto/request/TimetableLectureUpdateRequest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/in/koreatech/koin/domain/timetableV2/dto/request/TimetableLectureUpdateRequest.java b/src/main/java/in/koreatech/koin/domain/timetableV2/dto/request/TimetableLectureUpdateRequest.java index 01f2deec0..616c0cb83 100644 --- a/src/main/java/in/koreatech/koin/domain/timetableV2/dto/request/TimetableLectureUpdateRequest.java +++ b/src/main/java/in/koreatech/koin/domain/timetableV2/dto/request/TimetableLectureUpdateRequest.java @@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; +import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; @@ -20,13 +21,14 @@ public record TimetableLectureUpdateRequest( Integer timetableFrameId, @Valid + @NotEmpty(message = "시간표 정보를 입력해주세요.") @Schema(description = "시간표 정보", requiredMode = NOT_REQUIRED) - @NotNull(message = "시간표 정보를 입력해주세요.") List timetableLecture ) { @JsonNaming(value = SnakeCaseStrategy.class) public record InnerTimetableLectureRequest( @Schema(description = "시간표 강의 id", example = "1", requiredMode = REQUIRED) + @NotNull(message = "강의 id를 입력해주세요.") Integer id, @Schema(description = "강의 id", example = "1", requiredMode = NOT_REQUIRED)