RenaldMuzhaqi / Car_Rental

0 stars 0 forks source link

add swagger annotation for all controllers #15

Open RenaldMuzhaqi opened 1 month ago

RenaldMuzhaqi commented 1 month ago

similar to this one @Operation( summary = "Create Book REST API", description = "Create Book REST API is used to save book into database" ) @ApiResponse( responseCode = "201", description = "Http Status 201 CREATED" ) @PreAuthorize("hasRole('MANAGER')") @PostMapping("/save") @SecurityRequirement(name = "basicAuth") public ResponseEntity save(@Valid @RequestBody CreateBookDto createBookDto){ return new ResponseEntity<>(bookService.save(createBookDto), HttpStatus.CREATED); }