private static void fillRwadefProperties(Model model, Representation representation) { if (model.getProperties() == null) { return; } for (String key : model.getProperties().keySet()) { org.restlet.ext.platform.internal.model.Property property = new org.restlet.ext.platform.internal.model.Property(); Property swaggerProperty = model.getProperties().get(key); property.setDefaultValue(swaggerProperty.getDefault()); property.setDescription(swaggerProperty.getDescription()); // TODO: enumeration not implemented in Swagger 2.0 property.setExample(swaggerProperty.getExample()); property.setRequired(swaggerProperty.getRequired()); property.setList(swaggerProperty instanceof ArrayProperty); property.setName(key); // TODO: sub-properties not implemented in Swagger 2.0 // TODO: uniqueItems not implemented in Swagger 2.0 property.setUniqueItems(false); if (swaggerProperty instanceof ArrayProperty) { ArrayProperty arrayProperty = (ArrayProperty) swaggerProperty; property.setExample(arrayProperty.getItems().getExample()); } property.setType(SwaggerTypes.toDefinitionType(swaggerProperty)); representation.getProperties().add(property); } }
private static void fillRwadefProperties(Model model, Representation representation) { if (model.getProperties() == null) { return; } for (String key : model.getProperties().keySet()) { org.restlet.ext.platform.internal.model.Property property = new org.restlet.ext.platform.internal.model.Property(); Property swaggerProperty = model.getProperties().get(key); property.setDefaultValue(swaggerProperty.getDefault()); property.setDescription(swaggerProperty.getDescription()); // TODO: enumeration not implemented in Swagger 2.0 property.setExample(swaggerProperty.getExample()); property.setRequired(swaggerProperty.getRequired()); property.setList(swaggerProperty instanceof ArrayProperty); property.setName(key); // TODO: sub-properties not implemented in Swagger 2.0 // TODO: uniqueItems not implemented in Swagger 2.0 property.setUniqueItems(false); if (swaggerProperty instanceof ArrayProperty) { ArrayProperty arrayProperty = (ArrayProperty) swaggerProperty; property.setExample(arrayProperty.getItems().getExample()); } property.setType(SwaggerTypes.toDefinitionType(swaggerProperty)); representation.getProperties().add(property); } }
private static void fillRwadefProperties(Model model, Representation representation) { if (model.getProperties() == null) { return; } for (String key : model.getProperties().keySet()) { org.restlet.ext.apispark.internal.model.Property property = new org.restlet.ext.apispark.internal.model.Property(); Property swaggerProperty = model.getProperties().get(key); property.setDefaultValue(swaggerProperty.getDefault()); property.setDescription(swaggerProperty.getDescription()); // TODO: enumeration not implemented in Swagger 2.0 property.setExample(swaggerProperty.getExample()); property.setRequired(swaggerProperty.getRequired()); property.setList(swaggerProperty instanceof ArrayProperty); property.setName(key); // TODO: sub-properties not implemented in Swagger 2.0 // TODO: uniqueItems not implemented in Swagger 2.0 property.setUniqueItems(false); if (swaggerProperty instanceof ArrayProperty) { ArrayProperty arrayProperty = (ArrayProperty) swaggerProperty; property.setExample(arrayProperty.getItems().getExample()); } property.setType(SwaggerTypes.toDefinitionType(swaggerProperty)); representation.getProperties().add(property); } }
private static void fillRwadefProperties(Model model, Representation representation) { if (model.getProperties() == null) { return; } for (String key : model.getProperties().keySet()) { org.restlet.ext.platform.internal.model.Property property = new org.restlet.ext.platform.internal.model.Property(); Property swaggerProperty = model.getProperties().get(key); property.setDefaultValue(swaggerProperty.getDefault()); property.setDescription(swaggerProperty.getDescription()); // TODO: enumeration not implemented in Swagger 2.0 property.setExample(swaggerProperty.getExample()); property.setRequired(swaggerProperty.getRequired()); property.setList(swaggerProperty instanceof ArrayProperty); property.setName(key); // TODO: sub-properties not implemented in Swagger 2.0 // TODO: uniqueItems not implemented in Swagger 2.0 property.setUniqueItems(false); if (swaggerProperty instanceof ArrayProperty) { ArrayProperty arrayProperty = (ArrayProperty) swaggerProperty; property.setExample(arrayProperty.getItems().getExample()); } property.setType(SwaggerTypes.toDefinitionType(swaggerProperty)); representation.getProperties().add(property); } }
private static void fillRwadefProperties(Model model, Representation representation) { if (model.getProperties() == null) { return; } for (String key : model.getProperties().keySet()) { org.restlet.ext.platform.internal.model.Property property = new org.restlet.ext.platform.internal.model.Property(); Property swaggerProperty = model.getProperties().get(key); property.setDefaultValue(swaggerProperty.getDefault()); property.setDescription(swaggerProperty.getDescription()); // TODO: enumeration not implemented in Swagger 2.0 property.setExample(swaggerProperty.getExample()); property.setRequired(swaggerProperty.getRequired()); property.setList(swaggerProperty instanceof ArrayProperty); property.setName(key); // TODO: sub-properties not implemented in Swagger 2.0 // TODO: uniqueItems not implemented in Swagger 2.0 property.setUniqueItems(false); if (swaggerProperty instanceof ArrayProperty) { ArrayProperty arrayProperty = (ArrayProperty) swaggerProperty; property.setExample(arrayProperty.getItems().getExample()); } property.setType(SwaggerTypes.toDefinitionType(swaggerProperty)); representation.getProperties().add(property); } }