use of io.swagger.models.properties.StringProperty in project cxf by apache.
the class JaxRs2Extension method enforcePrimitive.
private Property enforcePrimitive(final Property in, final int level) {
if (in instanceof RefProperty) {
return new StringProperty();
}
if (in instanceof ArrayProperty) {
if (level == 0) {
final ArrayProperty array = (ArrayProperty) in;
array.setItems(enforcePrimitive(array.getItems(), level + 1));
} else {
return new StringProperty();
}
}
return in;
}
use of io.swagger.models.properties.StringProperty in project carbon-apimgt by wso2.
the class APIDefinitionFromSwagger20 method getDefaultBodyParameter.
private BodyParameter getDefaultBodyParameter() {
BodyParameter bodyParameter = new BodyParameter();
bodyParameter.setName("Payload");
bodyParameter.setDescription("Request Body");
bodyParameter.setRequired(false);
Model model = new ModelImpl();
Map<String, Property> properties = new HashMap<>();
Property property = new StringProperty();
properties.put("payload", property);
model.setProperties(properties);
bodyParameter.setSchema(model);
return bodyParameter;
}
Aggregations