Closed HarprasadShukla closed 7 years ago
It doesn't support JSON and YAML schema imports, it supports JSON and YAML representations of the spec itself. There isn't a representation of that in XML and there won't be one, so you can't just import an XSD. An XSD will normally describe a model, not your API, but even if it does describe your API, it's not Swagger.
Can you please share structural/Model differences YAML/JSON vs XSD/XML import why it's not supporting. not very much clear in little explanation.
I cannot. They have nothing in common. There is just no representation of Swagger in XML. Nor Protobuff. Nor other representation formats other than YAML or JSON.
our objective is to import XSD into Swagger.IO and generate C# .Net client classes that further use for custom development internally. We implemented same functionality using YAML file import and and save lot's of development effort and easy approachable. Now we are looking same type of functionality with XSD import into Swagger.IO so looking is that doable functionality or not?.
XSD is an XML model description.
Swagger (whether in JSON or YAML) is an API description.
There is no support for importing XSDs. You can describe your APIs using JSON or YAML, and if you need XML modeling for your schemas, you can do that, to some extent, but you cannot do that with XSD but you'd have to manually convert it to JSON Schema and use Swagger's XML extensions. Note, not all XMLs can be represented in Swagger.
However, an API description needs models to describe the data to be interchanged. So it could still be handy to have an XSD importer in place.
We are getting XSD from Tibco and trying to import in Swagger to generate XSD schema documentation and .Net client object code. I saw swagger only support JSON & YAML import. Does it supporting XSD schema file extension as well?
Regards, Harprasad harprasad.shukla@usbank.com