private static XML getXml(Schema property) { final XML existing = property.getXml(); if (existing != null) { return existing; } final XML created = new XML(); property.setXml(created); return created; }
protected XML resolveXml(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) { // if XmlRootElement annotation, construct an Xml object and attach it to the model XmlRootElement rootAnnotation = null; if (a != null) { rootAnnotation = a.getAnnotation(XmlRootElement.class); } if (rootAnnotation == null) { if (annotations != null) { for (Annotation ann: annotations) { if (ann instanceof XmlRootElement) { rootAnnotation = (XmlRootElement)ann; break; } } } } if (rootAnnotation != null && !"".equals(rootAnnotation.name()) && !"##default".equals(rootAnnotation.name())) { XML xml = new XML().name(rootAnnotation.name()); if (rootAnnotation.namespace() != null && !"".equals(rootAnnotation.namespace()) && !"##default".equals(rootAnnotation.namespace())) { xml.namespace(rootAnnotation.namespace()); } return xml; } return null; }
XmlElement xmlElement = (XmlElement) annotation; if (xmlElement != null && xmlElement.name() != null && !"".equals(xmlElement.name()) && !"##default".equals(xmlElement.name())) { XML xml = items.getXml() != null ? items.getXml() : new XML(); xml.setName(xmlElement.name()); items.setXml(xml);
/** * https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#xmlObject * * @return */ protected XML getXml() { XML xml = new XML(); return xml; }
private static XML getXml(Schema property) { final XML existing = property.getXml(); if (existing != null) { return existing; } final XML created = new XML(); property.setXml(created); return created; }
return null; XML xml = new XML();
return null; XML xml = new XML();
return null; XML xml = new XML();
protected XML resolveXml(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) { // if XmlRootElement annotation, construct an Xml object and attach it to the model XmlRootElement rootAnnotation = null; if (a != null) { rootAnnotation = a.getAnnotation(XmlRootElement.class); } if (rootAnnotation == null) { if (annotations != null) { for (Annotation ann: annotations) { if (ann instanceof XmlRootElement) { rootAnnotation = (XmlRootElement)ann; break; } } } } if (rootAnnotation != null && !"".equals(rootAnnotation.name()) && !"##default".equals(rootAnnotation.name())) { XML xml = new XML().name(rootAnnotation.name()); if (rootAnnotation.namespace() != null && !"".equals(rootAnnotation.namespace()) && !"##default".equals(rootAnnotation.namespace())) { xml.namespace(rootAnnotation.namespace()); } return xml; } return null; }
XmlElement xmlElement = (XmlElement) annotation; if (xmlElement != null && xmlElement.name() != null && !"".equals(xmlElement.name()) && !"##default".equals(xmlElement.name())) { XML xml = items.getXml() != null ? items.getXml() : new XML(); xml.setName(xmlElement.name()); items.setXml(xml);