Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow rendering of arrays unwrapped #31

Closed
ilyanep opened this issue Jun 11, 2020 · 0 comments
Closed

Allow rendering of arrays unwrapped #31

ilyanep opened this issue Jun 11, 2020 · 0 comments

Comments

@ilyanep
Copy link
Contributor

ilyanep commented Jun 11, 2020

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.

ilyanep added a commit to ilyanep/jsons2xsd that referenced this issue Jun 11, 2020
ilyanep added a commit to ilyanep/jsons2xsd that referenced this issue Jun 11, 2020
@ethlo ethlo closed this as completed in 559f8d1 Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant