File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/main/java/com/somemore/interestcenter Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 77import com .somemore .interestcenter .usecase .RegisterInterestCenterUseCase ;
88import io .swagger .v3 .oas .annotations .Operation ;
99import io .swagger .v3 .oas .annotations .tags .Tag ;
10+ import jakarta .validation .Valid ;
1011import lombok .RequiredArgsConstructor ;
1112import org .springframework .web .bind .annotation .*;
1213
@@ -21,7 +22,7 @@ public class InterestCenterCommandApiController {
2122
2223 @ Operation (summary = "관심기관 등록 API" )
2324 @ PostMapping ()
24- public ApiResponse <RegisterInterestCenterResponseDto > registerInterestCenter (@ RequestBody RegisterInterestCenterRequestDto requestDto ) {
25+ public ApiResponse <RegisterInterestCenterResponseDto > registerInterestCenter (@ Valid @ RequestBody RegisterInterestCenterRequestDto requestDto ) {
2526
2627 RegisterInterestCenterResponseDto responseDto = registerInterestCenterUseCase .registerInterestCenter (requestDto );
2728
Original file line number Diff line number Diff line change 44import com .fasterxml .jackson .databind .annotation .JsonNaming ;
55import com .somemore .interestcenter .domain .InterestCenter ;
66import io .swagger .v3 .oas .annotations .media .Schema ;
7+ import jakarta .validation .constraints .NotNull ;
78
89import java .util .UUID ;
910
1011@ JsonNaming (PropertyNamingStrategies .SnakeCaseStrategy .class )
1112public record RegisterInterestCenterRequestDto (
13+
1214 @ Schema (description = "봉사자 ID" , example = "123e4567-e89b-12d3-a456-426614174000" )
15+ @ NotNull (message = "봉사자 ID는 필수값입니다." )
1316 UUID volunteerId ,
1417
1518 @ Schema (description = "봉사자 ID" , example = "123e4567-e89b-12d3-a456-426614174000" )
19+ @ NotNull (message = "기관 ID는 필수값입니다." )
1620 UUID centerId
1721) {
1822 public InterestCenter toEntity (){
You can’t perform that action at this time.
0 commit comments