-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
OpenAPI 3.1 support #573
Comments
Is there an update on this? What would it take to get it to work? |
I tried my hand at this and failed. See: #653 I don't think this is possible right now, but I'm waiting for help from the AJV folks to see if they can help figure out what I'm doing wrong (or whether there is an error in any of the libraries/specs). See: ajv-validator/ajv#1745 |
Hi, I've been jumping down 3.1 support hell and it looks like this issue is the source of truth for this feature? In favor of forward progress, could this feature be split into separate features?
@essential-randomness PR has done a pretty good job spelling out the steps that are needed to update. (The following discussion is only AJV related, so please let me know if you would rather I move this to a separate issue/discussion) For my own benefit, it seems like this is the current situation (please correct me if I'm wrong)
So to summarize, we definitely need to upgrade AJV to support 3.1, but doing so might break support for 3.0. The PR linked above actually handles most of that I believe. It sounds like she ran into problems actually implementing 3.1, and not a blocker to updating AJV itself? Support for (I was going to suggest an alternative of "forcefully" bumping to I'd be happy to try to take over the existing PR to refactor it as an AJV-only bump. I believe that should be a non-breaking change? (MINOR version bump) |
I'd be very happy to have my PR picked up/used as inspiration! But it seems the issues I opened in the AJV repo haven't been closed yet, so I'm unsure what changed that made 3.1 work. Happy if that's the case, and looking forward to finally being able to use this library. |
I'm not sure anything has? It sounds like the existing issue is with So this package should be able to bump to v8 safely. Actual 3.1 support is probably still blocked by that issue. There is a suggested edit to the spec that might be a viable workaround ajv-validator/ajv#1573
But I think it would be easiest to implement and review by spitting that support from AJV bump |
Just a hint: OpenApi schema validator works around the issue in AJV by using a modified version of the official schema in which the $dynamic refs have been replaced. (see https://github.com/seriousme/openapi-schema-validator/blob/master/test/convert-3.1.js) This way it can still use AJV ;-) The modified schema is available as: https://github.com/seriousme/openapi-schema-validator/blob/master/schemas/v3.1/schema.json Hope this helps, |
@cdimascio @JacobLey looking at #713 it says it only partly solves this, not that it solves it completely. Can you re-open? |
Agreed, 3.1 support should now be unblocked but is not yet implemented Will hopefully get around to it in near future |
Thank you so much for your hard work! Looking forward to 3.1 support in the future! |
Yes, many thanks Jacob. |
Hi, |
2 years later... will nothing be done? |
|
I can contribute the changes regarding this migration. |
really need this please |
Hello, any news on this support ? |
any replacement of |
From what I understand the core reason this library cannot support OpenAPI 3.1 is due to the underlying AJV library not yet supporting $dynamicRef features. This issue has been open on the AJV GitHub for awhile. I recently made a post and the suggestion still seems to be that Can someone confirm that they agree the support should be added to this library instead of AJV? Does anyone else know if there are any other reasons holding back support for OpenAPI Spec v3.1? |
Hello Happy 2024 everyone 🥳 |
Thanks a lot! I suspect this requires a bunch more work. It certainly requires tests. I will plan to roll an alpha release, so folks can kick the tires on PR #882 |
Hello @cdimascio – any update on alpha release with PR #882 ? |
An Alpha release to test with would be great! |
Hoping this is merged soon! |
@cdimascio i submited a PR #1009 to also fix the ajv instance used in request validator. |
Is your feature request related to a problem? Please describe.
OpenAPI 3.1 was released a while ago. It would be nice if it was supported.
Describe the solution you'd like
Full OpenAPI 3.1 support.
Additional context
https://openapi.tools/ lists this tool as not having OpenAPI 3.1 support.
The text was updated successfully, but these errors were encountered: