I want to have a description for RequestBody
in spring boot openapi 3 .
so i make my code like this :
@PostMapping(produces = "application/json", consumes = "application/json")
public ResponseEntity<Book> addBook(
@Schema(
description = "Book to add.",
required=true,
schema=@Schema(implementation = Book.class))
@Valid @RequestBody Book book
) {
return ResponseEntity.ok(bookRepository.add(Book));
}
RequestBody
description is Book to add.
My desire UI is like this :
But nothings happen ! There is no description in my UI.
description was added to Schemas
panel Book
entity !!!
What is the problem ?