api-spec-converter icon indicating copy to clipboard operation
api-spec-converter copied to clipboard

WADL 'representation' and XSD

Open aroach opened this issue 8 years ago • 2 comments

First off, thanks for creating this project! I'm helping some colleagues with a conversion from WADL to Swagger_2, but the WADL file references XSDs to define the objects that are returned or expected by the API.

I think that to insert this behavior, one would need to start groveling about here in the WADL converter. Yes?

https://github.com/lucybot/api-spec-converter/blob/master/lib/formats/wadl.js#L162

Anyway, wondered if there is a fork or branch that may have deeper support for bringing the object representations forward into the Swagger "definitions". Or, perhaps there's a better way?

aroach avatar Sep 01 '16 15:09 aroach

It would be great to start generating JSON Schema from XSDs. Would definitely welcome any contributions to that effect.

For your own purposes, you could probably convert XSD using jsonix-schema-compiler (requires Java): https://github.com/highsource/jsonix-schema-compiler/wiki/JSON-Schema-Generation

and inject the resulting JSON Schema into your swagger doc.

rbren avatar Sep 01 '16 17:09 rbren

jgeXml has an xsd2json schema module which may be of some help, it has only been lightly tested on the XSD I needed to add to a Swagger definition.

MikeRalphson avatar Apr 28 '17 11:04 MikeRalphson