-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
Hi,
I have an API where the class and operation both has @path annotation ( @path("/{id}") ) as shown in following interface example. @path("/v1.0/private/communications") and @path("/{id}")
Interface :
@Tag(name = "CommunicationsAPI")
@Path("/v1.0/private/communications")
public interface CommunicationsAPI extends CommonJsonAPI {
@GET
@Path("/{id}")
CommunicationDetails getCommunicationDetails(
@Parameter(name = "id", description = "Number which uniquely identifies the Communication.")
@PathParam("id") String communicationId
);
}Implementation class :
@Path("/")
public class CommunicationsAPIImpl implements CommunicationsAPI {
public CommunicationDetails getCommunicationDetails( String communicationId ) {
}
}
When I generate the openapi.json / openapi.yaml using swagger-maven-plugin-jakarta plugin, the generated JSON / YAML has got two entries.
Open API JSON :
"/v1.0/private/communications/{id}" : {
"get" : {
"tags" : [ "CommunicationsAPI" ],
"summary" : "This API returns details of a communication by id.",
"/{id}" : {
"get" : {
"tags" : [ "CommunicationsAPI" ],
"summary" : "This API returns details of a communication by id.",I think because of this it appears two times in API docs :
I need only "/v1.0/private/communications/{id}" , and "/{id}" should not be visible.
Wondering if there is a configuration to show only one with with full path ?
Metadata
Metadata
Assignees
Labels
No labels