Skip to content

Allow rendering of arrays unwrapped #31

@ilyanep

Description

@ilyanep

This JSON Schema:

    "Foo": {
      "title": "Foo",
      "type": "object",
      "properties": {
        "uris": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Bar"
          }
        }
      }
    }

Yields this XSD:

   <complexType name="Foo">
      <sequence>
         <element minOccurs="0" name="uris">
            <complexType>
               <sequence>
                  <element maxOccurs="unbounded"
                           minOccurs="0"
                           name="Bar"
                           type="x:Bar"/>
               </sequence>
            </complexType>
         </element>
      </sequence>
   </complexType>

But ideally I'd have an option to make it render:

   <complexType name="Foo">
      <sequence>
         <element minOccurs="0" name="uris" type="x:Bar"/>
      </sequence>
   </complexType>

This would be more in line with both how protobuf's XML renderer library renders repeated elements and with what happens when I use Google's library to render a message into a JSON string and then use Jackson's XML data format to render that to XML.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions