-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
WIP: OpenAPI v3.1 Support #1399
Conversation
This comment has been minimized.
This comment has been minimized.
@philsturgeon any updates on this? Thanks |
Not yet, I’m putting together a task force to handle all the 3.1 changes across our ecosystem.
…--
Phil Sturgeon
DevRel @ Stoplight.io
On Jan 21, 2021, at 18:27, Gertjan De Wilde ***@***.***> wrote:
@philsturgeon any updates on this? Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Ait, good luck! Let us know if we can help |
@philsturgeon, congrats on the release of OAS 3.1.0! Any news on the task force? |
@Gdewilde I'm very excited OAS3.1 final has been released. Folks here are working on things as quickly as they can despite being literally snowed out in Austin Texas. :) |
Basically JSON Schema Draft support is dropped, and OpenAPI v3.0 support is proivded through converting the old schema.oas3.json to use Draft 2019-09 with json-schema-migrate. The TypeScript has changed a lot and now everything is very broken.
@@ -33,7 +33,6 @@ | |||
"node": ">=10.18" | |||
}, | |||
"scripts": { | |||
"postinstall": "patch-package", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this because it was focused on nullable which is gone now. We might need to bring it back to support OAS3.0 but im on a rampage trying to get 3.1 working first.
cache?: object; | ||
logger?: CustomLogger | false; | ||
nullable?: boolean; | ||
+ xNullable?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wanted to make this patch work, i think the main difference is that nullable is always set to true now, which is funny because its been removed in OAS3.1, but... whatever that's the change according to https://github.com/ajv-validator/ajv/releases/tag/v7.0.0
@P0lip hey I'm spiking on something over here and running into a problem:
|
Did you try upgrading |
@P0lip progress! Any idea why we're downloading meta schemas?
Also we've got json-ref-resolver and json-schema-ref-parser in here? |
Hi there. I think that moving to OpenAPI v3.1 would be lovely. |
Yep this spike showed how far we could get without the dependencies improving, so now we're waiting for AJV v8. A beta has just come out so we can once again make progress. |
Awesome work! Thanks a lot for update :) |
Thankfully this PR has been superceded by #1589. |
Fixes #1302
OpenAPI v3.1 will be rather tricky for Spectral to implement for a few reasons:
I attempted shoving both AJV v6 and v7 in at the same time but there are quite a few major differences between the two (fair enough) and that meant it was a nightmare to pull off.
Instead, I have upgraded the OAS 3.0 metaschema from being based on draft 4 to being based on dradt 2019-09. This should work...