Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
validation 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ori0o0p committed Feb 29, 2024
1 parent 4a770c2 commit 8d05967
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Mono<Void> updateDocument(@NotBlank @PathVariable String documentId, @Val

@PatchMapping("/info")
@ResponseStatus(HttpStatus.NO_CONTENT)
public Mono<Void> updateInfo(@RequestBody UpdateInfoRequest request) {
public Mono<Void> updateInfo(@Valid @RequestBody UpdateInfoRequest request) {
return updateInfoService.execute(request);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package com.example.daemawiki.domain.info.dto;

import com.example.daemawiki.domain.info.model.Info;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.util.List;

public record UpdateInfoRequest(
@NotBlank(message = "문서의 id를 입력해주세요.")
String documentId,
List<Info> infoList,
@NotNull(message = "문서의 버전을 입력해주세요.")
Integer version
) {
}

0 comments on commit 8d05967

Please sign in to comment.