LucyBot-Inc / api-spec-converter

Convert API descriptions between popular formats such as OpenAPI(fka Swagger), RAML, API Blueprint, WADL, etc.
https://lucybot-inc.github.io/api-spec-converter/
MIT License
1.12k stars 183 forks source link

Support openapi3.0 to swagger2.0 with `oneOf` feature? #183

Closed youhangwang closed 6 years ago

youhangwang commented 6 years ago

When I use api-spec-converter --from=openapi_3 --to=swagger_2 --syntax json --order=alpha swagger.json > swagger2.0.json, I found it cannot change oneOf(only support in 3.0) to a swagger 2.0 suitable format.

rbren commented 6 years ago

Yes, downgrading to 2.0 will generally be lossy. There's nothing we can do for the lack of oneOf support in 2.0

toddiuszho commented 5 months ago

Can it please forcibly remove oneOf under a path parameter? When trying to create an ApiConfig (OAS 2.0) for GCP API Gateway, it rejects the operation because oneOf fails validation.

"Will generally be lossy", yes. But in this context, not lossy enough!