fnogatz / xsd2json

Translate XML Schema into equivalent JSON Schema
MIT License
149 stars 28 forks source link

ref, complexType in element-tag, documentation in non-leaf-tags #8

Open PiQ99 opened 9 years ago

PiQ99 commented 9 years ago

Hey,

at first I have to say, I like your work. It is a great tool that helps me a lot at the moment. In addition I wanted to ask, if you plan further development? There are several things to do I guess. Of course I saw, you did not commit anything about two months now, but maybe you continued developing at home?

e.g. what about:

These are several things that do not work atm, afaik, and I wanted to ask, if you are going to fix these things, maybe?

Thanks for your answer and have a nice week!

fnogatz commented 9 years ago

Yes, the aim is to extend xsd2json step by step. Currently I'm working on the integration of xs:import and xs:include with its multiple schema support.

The best way to get things fixed is to provide some concrete examples. Feel free to open a pull request containing only some test cases in the /test/xsd and /test/json directories. The ref support should not be that hard, xs:documentation and xs:annotation too. What do you mean by your last bullet point?

fnogatz commented 9 years ago

Current status:

stevenroose commented 7 years ago

@fnogatz I have an xs:complexType that does not appear in the JSON schema. Does that fall under this issue? It looks like this:

    <xs:complexType name="DocumentLineType1Choice">
        <xs:choice>
            <xs:element name="Cd" type="ExternalDocumentLineType1Code"/>
            <xs:element name="Prtry" type="Max35Text"/>
        </xs:choice>
    </xs:complexType>

FYI, I was just looking into this tool since we're interested in a JSON Schema for some of the ISO 20022 messages. They are quite big and complex, so you might be interested in them, perhaps as some kind of benchmark (the conversion took several minutes). This is one of the XSD's, the one that I'm currently looking into: https://www.iso20022.org/documents/messages/pacs/schemas/pacs.008.001.06.zip