use of io.swagger.v3.core.filter.resources.NoParametersWithoutQueryInFilter in project swagger-core by swagger-api.
the class SpecFilterTest method filterAwayQueryParameters.
@Test(description = "it should filter any query parameter")
public void filterAwayQueryParameters() throws IOException {
final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);
final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoParametersWithoutQueryInFilter(), null, null, null);
if (filtered.getPaths() != null) {
for (Map.Entry<String, PathItem> entry : filtered.getPaths().entrySet()) {
validateParameters(entry.getValue().getGet());
validateParameters(entry.getValue().getPost());
validateParameters(entry.getValue().getPut());
validateParameters(entry.getValue().getPatch());
validateParameters(entry.getValue().getHead());
validateParameters(entry.getValue().getDelete());
validateParameters(entry.getValue().getOptions());
}
}
}
Aggregations