-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document one REST endpoint with springdoc #82
Comments
@blcham @Operation(summary = "Create a new component")
@ApiResponses(value = {
@ApiResponse(responseCode = "201", description = "Component created successfully"),
@ApiResponse(responseCode = "400", description = "Invalid input")
})
@ResponseStatus(HttpStatus.CREATED)
@PostMapping(consumes = {MediaType.APPLICATION_JSON_VALUE, JsonLd.MEDIA_TYPE})
public Component create(@RequestBody Component component) {
log.info("> create - {}", component);
repositoryService.persist(component);
return component;
}
@Operation(summary = "Retrieve all components")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successfully retrieved all components")
})
@GetMapping(produces = {JsonLd.MEDIA_TYPE, MediaType.APPLICATION_JSON_VALUE})
public List<Component> findAll() {
return repositoryService.findAll();
} |
@palagdan i updated A/C for [1] u might need something like |
Could you explain the last A/C to me? |
I would like to have the web form generated by springdoc ready as much as possible to to execute any of any concrete REST API endpoint. I assume it is possible to execute annotated REST API endpoints from there -- am i right? |
Yes, you are right! |
- Generate entity type specific bad request response messages - response message is a concatenation of entity type name and validation erro default message.
- Generate entity type specific bad request response messages - response message is a concatenation of entity type name and validation erro default message.
The goal of the task is to agree on how to document REST endpoints. Inspiration can be taken from https://github.com/kbss-cvut/termit.
A/C:
The text was updated successfully, but these errors were encountered: