fnogatz / xsd2json

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

Options for xsd2json? #21

Open PiQ99 opened 9 years ago

PiQ99 commented 9 years ago

Is there the possibility, to add option-parameters to xsd2json :-)? E.g. it would be nice, if the user could handle, if the result file should contain "$ref"s or not?!

Thanks again!

fnogatz commented 9 years ago

What do you mean by containing $ref or not? Could you please provide an example of two possible results, depending on your option?

PiQ99 commented 9 years ago

The example is the following. Just wanted maybe an option, so the user could decide, if he wants result number one (top) or number two (bottom) - I know, actually its right to resolve it to such a declaration with "$ref".

Example: http://jsfiddle.net/PiQ99/vz3mcm7g/1/

fnogatz commented 9 years ago

Okay, I will have a look at it. This flag would also prevent some hiccups as stated in #18 where you want to resolve a type that has not been included explicitly.