-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support transforming v3 spec to v2 in CLI #48
Comments
This would be a nice project to be done in https://github.com/pickfire/babelfish as well, maybe we could collaborate? |
@pickfire I'd love to do that, but it looks like babelfish is a converter for encodings, whereas OpenAPI is a specification which could be in any encoding (JSON/YAML), so this is probably not in the scope of babelfish? |
Not really a converter for encodings, just a converter for stuff. Right now only encodings is there because encodings conversion is the easiest. This is probably a good first non-encoding conversion. |
Isn't this ambiguous? Either way, it's probably time to update the scope of babelfish in its README and project description. 😄 Paperclip, on the other hand, is focusing entirely on tooling related to OpenAPI, which includes converting v3 to v2 and vice versa, which is why I believe it's well within the scope of this project. |
One other thing I'd like to point out here is that the v2 and v3 spec aren't exactly interchangeable (v2 to v3 is straightforward, but the other way around isn't), so this also involves making a few decisions along the way, which may not be accepted by other OAPI tools because there's no universally accepted way to do that conversion. |
True, but I do like it being ambiguous rather than sprinkling around like how I see So it might be good to have something for converting stuff, but at least try to get a similar API. |
This would be a nice workaround for #476 There are very few tools which can do this. c.f. https://stackoverflow.com/questions/56637299/convert-openapi-3-0-to-swagger-2-0 |
The transformations I needed to get my openapi 3 doc accepted by the v2 parser:
The result isnt perfect, but it is good enough for what I need atm . |
It would be nice to support transforming a v3 spec to v2 using the paperclip CLI. I think v2 and v3 only change in their structure, but if there's something more, then we can use vendor extensions to cover whatever we need.
The text was updated successfully, but these errors were encountered: