Search in sources :

Example 1 with ReplaceGetOperationsFilter

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

the class SpecFilterTest method replaceGetResources.

@Test(description = "it should replace away with a new operation")
public void replaceGetResources() throws IOException {
    final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);
    OpenAPI filter = new SpecFilter().filter(openAPI, new ReplaceGetOperationsFilter(), null, null, null);
    assertOperations(filter, NEW_OPERATION_ID, NEW_OPERATION_DESCRIPTION);
}
Also used : ReplaceGetOperationsFilter(io.swagger.v3.core.filter.resources.ReplaceGetOperationsFilter) OpenAPI(io.swagger.v3.oas.models.OpenAPI) Test(org.testng.annotations.Test)

Aggregations

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