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 18, 2024
1 parent da80999 commit 0f47690
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Mono<Void> createDocument(@Valid @RequestBody SaveDocumentRequest request
}

@GetMapping("/{documentId}")
public Mono<GetDocumentResponse> getDocument(@PathVariable String documentId) {
public Mono<GetDocumentResponse> getDocument(@NotBlank @PathVariable String documentId) {
return getDocumentService.getDocumentById(documentId);
}

Expand All @@ -57,13 +57,13 @@ public Flux<SimpleDocumentResponse> getDocumentOrderByVersion() {

@DeleteMapping("/{documentId}")
@ResponseStatus(HttpStatus.NO_CONTENT)
public Mono<Void> deleteDocument(@PathVariable String documentId) {
public Mono<Void> deleteDocument(@NotBlank @PathVariable String documentId) {
return deleteDocumentService.execute(documentId);
}

@PatchMapping("/{documentId}")
@ResponseStatus(HttpStatus.NO_CONTENT)
public Mono<Void> updateDocument(@PathVariable String documentId, @Valid @RequestBody SaveDocumentRequest request) {
public Mono<Void> updateDocument(@NotBlank @PathVariable String documentId, @Valid @RequestBody SaveDocumentRequest request) {
return updateDocumentService.execute(request, documentId);
}

Expand Down

0 comments on commit 0f47690

Please sign in to comment.