Search in sources :

Example 1 with NoPathItemFilter

use of io.swagger.v3.core.filter.resources.NoPathItemFilter in project swagger-core by swagger-api.

the class SpecFilterTest method filterAwayPathItemWithoutRef.

@Test(description = "it should filter any PathItem objects without Ref")
public void filterAwayPathItemWithoutRef() throws IOException {
    final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);
    final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoPathItemFilter(), null, null, null);
    assertEquals(0, filtered.getPaths().size());
}
Also used : OpenAPI(io.swagger.v3.oas.models.OpenAPI) NoPathItemFilter(io.swagger.v3.core.filter.resources.NoPathItemFilter) Test(org.testng.annotations.Test)

Aggregations

NoPathItemFilter (io.swagger.v3.core.filter.resources.NoPathItemFilter)1 OpenAPI (io.swagger.v3.oas.models.OpenAPI)1 Test (org.testng.annotations.Test)1