use of io.swagger.models.ModelImpl 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