-
-
Notifications
You must be signed in to change notification settings - Fork 209
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 for OpenAPI >= 3.0.0 #265
Comments
I would love to see this! |
V2 differs from v3 because the general structure has changed (params, body and so on) and some keywords where added (such as oneOf). I was wandering if it is enough to generate always the v2 (as this package already does) and then convert it to v3 automatically if the option has been passed. |
If the industry is consistently moving to open api, I would migrate the package to open api entirely :) |
Actually at the moment we are in the middle of Python 2/3 problem here: swagger 2.0 is still largely used and OpenAPI 3.0.0 is emerging as new standard. I am not totally confident to drop support for 2.0 yet. |
Having an config parameter would be good. |
In this case, we should:
I think it is not much flexible. Right now the code load the JSONSchema is going to be compatible with OAS3, I hope that when it will exist from draft status, it will be 100% so the effort to implement this will be near 0 🔝 |
Any progress on this? We're looking at integrating fastify-swagger with our application however we rely on OAS3. And the other fastify-oas library does not meet our spec... |
I could pick this up (OpenAPI 3 def is a huge thing now) if someone could point me out in the direction of what needs to be done. |
@kibertoad That would be awesome! @Eomm may be able to point you in the right direction? |
However, swagger is very much specifically OpenAPI 2. So it might make sense to fork the plugin into fastify-openapi |
True. But it would be nice to have just one package that does both |
@fox1t Then it would make sense to call that fastify-openapi and deprecate swagger one. |
Swagger is still very used and it is better to continue to support it. As I already said it is a Python 2/3 problem. :) |
I think the best way is to maintain two separate branches in here. |
I think it might be worth noting here that there is also fastify-oas that supports openapi 3.0 and now works with fastify v3 aswell. |
I am going to say this again, for future reference: I still think that having one plugin support them both is the best choice. |
Agreed, a single repository will allow for a more community engagement. |
There is literally nothing blocking that minus working for supporting both swagger and openapi on the same module. fastify-oas exists because of #87. The issue is literally still there. |
Hi guys, how can we support you integrating both standards into one repo? |
@benediktdertinger, as @mcollina pointed out, we should start with #87 |
Ah ok. |
@fox1t thanks for clarifying. Makes sense to me. It is still unclear for me wether I should focus on the |
@benediktdertinger the idea is to add functionalities to |
JSON Schema for the OpenAPI 3.0 Specification have beed released OAI/OpenAPI-Specification#1032 https://github.com/OAI/OpenAPI-Specification/tree/master/schemas/v3.0 |
I think this plugin should move on to OAS3 and convert it to Swagger 2.0 for backward compatible. I am willing to make an PR for the OAS3 feature and I want the dev team to confirm the right way to implement this. Resources that maybe useful in below |
🚀 Feature Proposal
I was wondering if there is any reason why we are using only v2 of Swagger spec. Therefore, I propose to add an option during the plugin registration to allow the users to choose between v2 and v3 when dynamic mode is used.
Motivation
They are some useful features of OpenAPI v3 that are used by https://github.com/sinclairzx81/typebox to generate the awesome typed schemas that are used by Fastify routes.
The text was updated successfully, but these errors were encountered: