Search in sources :

Example 1 with NoPetRefSchemaFilter

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

the class SpecFilterTest method filterAwayPetRefInSchemas.

@Test(description = "it should filter any Pet Ref in Schemas")
public void filterAwayPetRefInSchemas() throws IOException {
    final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);
    final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoPetRefSchemaFilter(), null, null, null);
    validateSchemasInComponents(filtered.getComponents(), PET_MODEL);
}
Also used : NoPetRefSchemaFilter(io.swagger.v3.core.filter.resources.NoPetRefSchemaFilter) OpenAPI(io.swagger.v3.oas.models.OpenAPI) Test(org.testng.annotations.Test)

Aggregations

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