use of com.reprezen.kaizen.oasparser.model3.Path in project ets-ogcapi-features10 by opengeospatial.
the class OpenApiUtils method isFreeFormParameterSupportedForCollection.
public static boolean isFreeFormParameterSupportedForCollection(OpenApi3 apiModel, URI iut, String collectionName) {
String requestedPath = createCollectionPath(apiModel, iut, collectionName);
List<Path> paths = identifyTestPoints(apiModel, requestedPath, new PathMatcher());
for (Path path : paths) {
Collection<Parameter> parameters = path.getGet().getParameters();
for (Parameter parameter : parameters) {
if (parameter.getSchema() != null && parameter.getSchema().isAdditionalProperties()) {
return true;
}
}
}
return false;
}
use of com.reprezen.kaizen.oasparser.model3.Path in project ets-ogcapi-features10 by opengeospatial.
the class OpenApiUtilsTest method testRelativeServerPath.
@Test
public void testRelativeServerPath() throws Exception {
OpenApi3Parser parser = new OpenApi3Parser();
URL openApiDocument = OpenApiUtilsTest.class.getResource("openapi-relativeServerPath.json");
OpenApi3 apiModel = parser.parse(openApiDocument, true);
List<TestPoint> testPoints = retrieveTestPoints(apiModel, iut);
assertThat(testPoints.size(), is(2));
assertThat(testPoints.get(0).getServerUrl(), is("http://localhost:8080/path"));
assertThat(testPoints.get(1).getServerUrl(), is("http://localhost:8080/path"));
}
Aggregations