From 0f47690172421ce09962a5653dbfdb7b83dee8ab Mon Sep 17 00:00:00 2001 From: 101 Date: Sun, 18 Feb 2024 13:39:53 +0900 Subject: [PATCH] =?UTF-8?q?Validation=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../daemawiki/domain/document/api/DocumentController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/example/daemawiki/domain/document/api/DocumentController.java b/src/main/java/com/example/daemawiki/domain/document/api/DocumentController.java index 11e93ecb..7fa5eef5 100644 --- a/src/main/java/com/example/daemawiki/domain/document/api/DocumentController.java +++ b/src/main/java/com/example/daemawiki/domain/document/api/DocumentController.java @@ -36,7 +36,7 @@ public Mono createDocument(@Valid @RequestBody SaveDocumentRequest request } @GetMapping("/{documentId}") - public Mono getDocument(@PathVariable String documentId) { + public Mono getDocument(@NotBlank @PathVariable String documentId) { return getDocumentService.getDocumentById(documentId); } @@ -57,13 +57,13 @@ public Flux getDocumentOrderByVersion() { @DeleteMapping("/{documentId}") @ResponseStatus(HttpStatus.NO_CONTENT) - public Mono deleteDocument(@PathVariable String documentId) { + public Mono deleteDocument(@NotBlank @PathVariable String documentId) { return deleteDocumentService.execute(documentId); } @PatchMapping("/{documentId}") @ResponseStatus(HttpStatus.NO_CONTENT) - public Mono updateDocument(@PathVariable String documentId, @Valid @RequestBody SaveDocumentRequest request) { + public Mono updateDocument(@NotBlank @PathVariable String documentId, @Valid @RequestBody SaveDocumentRequest request) { return updateDocumentService.execute(request, documentId); }