I’m using spring doc open api in my spring boot project.
In my rest controller I have 2 endpoints that are identical and only differ in params and the content of requestbody.
Example:
@PostMapping(value = "/v1/types", params = "type=typeA)
...
@PostMapping(value = "/v1/types", params = "type=typeB)
Due OpenAPI Spec the endpoint should be unique and params are not considered as part of path. So swagger ui shows only one endpoint, I guess the first one in alphabetical order.
In my case my frontend team needs to know which endpoints to use in my api. So, I find the alternative from actuator the /mappings endpoint, that shows every endpoint in my project, extactly what I need.
My problem is that I need to add some description for each endpoint to describe which objects are required and what exactly the endpoint does.
Is there any way to add some kind of description under the endpoints listed in /actuator/mappings?
FYI: Spring Boot 3.3.0
Itried a lot with Swagger API, like adding several information to the endpoints, like with @Operation, @APIResponses or @Parameter annotations, but it doesn’t help to show the same endpoint with different params.
I looked after the official spring boot actuator documentation, but there is no information about it.
Nick Mendel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.