Let say i have the two following endpoints :
/api/v2/query/{param1}
/api/v2/query/filter
I want to have in my swagger-ui only : /api/v2/query/{param1}
So i tried to filter :
@Bean
public GroupedOpenApi adminApi() {
return GroupedOpenApi.builder().group("filteredGroup").pathsToMatch("/api/v2/query/{param1}").pathsToExclude("/api/v2/query/filter").build();
}
The issue is that i still see this endpoints :
/api/v2/query/filter
How can I exclude it ? I think {param1}
acts like *
these endpoints are ambiguous because
/query/filter
and/query/{template}
can resolve to the same endpoint. what are you trying to do with the/filter
that can't be done with the template path?From the looks of it, using a path
/query
is already causing you some issues where you should be using the query parameters (?
) and then adding query parameter definitions in your OpenAPI descriptionsomething like this..
api/v2/cars?filter=
The Specification defines the behavior you have shown as non-compliant.