Skip to content

Commit

Permalink
fix: PUT/v2/timetables/lecture 검증 로직 추가 (#1117)
Browse files Browse the repository at this point in the history
* fix: TimetableLectureUpdateRequest List필드 검증 어노테이션 추가

* fix: Integer id 검증 추가 및 로직 수정

---------

Co-authored-by: 김원경 <[email protected]>
  • Loading branch information
kwoo28 and 김원경 authored Dec 4, 2024
1 parent b8537f0 commit f9a8828
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -20,13 +21,14 @@ public record TimetableLectureUpdateRequest(
Integer timetableFrameId,

@Valid
@NotEmpty(message = "시간표 정보를 입력해주세요.")
@Schema(description = "시간표 정보", requiredMode = NOT_REQUIRED)
@NotNull(message = "시간표 정보를 입력해주세요.")
List<InnerTimetableLectureRequest> 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)
Expand Down

0 comments on commit f9a8828

Please sign in to comment.