public void processProperty(Property property) { if (property instanceof RefProperty) { processRefProperty((RefProperty) property); } else if (property instanceof ArrayProperty) { processArrayProperty((ArrayProperty) property); } else if (property instanceof MapProperty) { processMapProperty((MapProperty) property); } else if (property instanceof ObjectProperty) { processObjectProperty((ObjectProperty) property); } else if (property instanceof ComposedProperty) { processComposedProperty((ComposedProperty) property); } }
private void processObjectProperty(ObjectProperty property) { final Map<String, Property> properties = property.getProperties(); if (properties != null) for (Property p : properties.values()) processProperty(p); }
public ModelProcessor(ResolverCache cache, Swagger swagger) { this.propertyProcessor = new PropertyProcessor(cache, swagger); this.externalRefProcessor = new ExternalRefProcessor(cache, swagger); }
private void processMapProperty(MapProperty property) { final Property additionalProperties = property.getAdditionalProperties(); if (additionalProperties != null) { processProperty(additionalProperties); } }
private void processComposedProperty(ComposedProperty property) { final List<Property> properties = property.getAllOf(); if (properties != null) for (Property p : properties) processProperty(p); } }
private void processArrayModel(ArrayModel arrayModel) { final Property items = arrayModel.getItems(); // ArrayModel has a properties map, but my reading of the swagger spec makes me think it should be ignored if (items != null) { propertyProcessor.processProperty(items); } }
private void processArrayProperty(ArrayProperty property) { final Property items = property.getItems(); if (items != null) { processProperty(items); } }
private void processModelImpl(ModelImpl modelImpl) { final Map<String, Property> properties = modelImpl.getProperties(); if (properties == null) { return; } for (Map.Entry<String, Property> propertyEntry : properties.entrySet()) { final Property property = propertyEntry.getValue(); propertyProcessor.processProperty(property); } }