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); }