I have a schema definition in a XSD file which is provided by ISO20022. This schema will need to be used in a swagger/openAPI definition (in yaml format). Since the XSD file has about 1000 lines, manual work is impracticable. This old thread mention some solution, but it is not straightforward.
Does anyone know any tool which provides an easy way to import the schema definitions from a XSD file into a swagger/openAPI yaml file?
You could try xsd2json from the npm module jgexml. It was written to do precisely this for a large API specified in XSD.
I could not escape from manual work in this task. What I've done was using "xsd2json" to convert the XSD schema to JSON. Then, I used the website www.json2yaml.com to get it as YAML. Afterwards, I created a swagger file myself, then merged the YAML file into it. Thanks for your responses!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With