@Override public void model(Model model) { model.setProperties(fillMap(model.getProperties())); if (model instanceof ModelImpl) { } }
private void attachAdditionalProps(Model model, Map<String, Property> dataProps) { if (model instanceof ComposedModel) { model = ((ComposedModel) model).getChild(); } Map<String, Property> props = model.getProperties(); if (props == null) { props = new HashMap<>(); } for (Map.Entry<String, Property> entry : dataProps.entrySet()) { props.put(entry.getKey(), entry.getValue()); } model.setProperties(props); }
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; }
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; }
model.setProperties(props);
model.setProperties(initProperties());