-
Notifications
You must be signed in to change notification settings - Fork 48
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.0 #58
base: master
Are you sure you want to change the base?
OpenApi 3.1.0 #58
Conversation
Co-authored-by: James Hinshelwood <[email protected]>
Co-authored-by: James Hinshelwood <[email protected]>
Co-authored-by: James Hinshelwood <[email protected]>
Co-authored-by: James Hinshelwood <[email protected]>
Co-authored-by: James Hinshelwood <[email protected]>
Co-authored-by: James Hinshelwood <[email protected]>
…vel version switch under a module
…vel version switch under a module
Is there ETA on this, what can I do to help driving it forward? I have a tool that uses schemars for schema generation but with own type definitions. It would be great to transition to this instead. |
@tamasfe I'm increasingly of the opinion that using |
I see, thanks. That's unfortunate, it's currently the best schema generator library and having its schema types among the openapi types has been very convenient for me. |
Totally! It would be great if it were being diligently maintained. |
This PR adds support for OpenAPI 3.1 to the OpenAPI connector. Despite the name, 3.1 is a breaking change from 3.0. The primary change is that schemas are now JSON schema, rather than some bizarre "subset superset" . There's no currently released crate that has support for OpenAPI 3.1, but there is a fork of our existing openapiv3 library that adds support. I've forked that fork into the `grafbase` org for now - it was behind on a couple of patches so I've merged those in. There is [a PR to merge this back into the actual crate](glademiller/openapiv3#58) but it looks kind of like that'll never be merged. Guess we might want to revisit when/if there's an actual release with support. Anyway, unfortunately this version of the crate has made some choices around how to structure schemas that are _completely_ different from the v3 approach (a common OpenAPI problem - if there is a different way to do things you can guarantee someone has). So this required a fair bit of new code - similar to adding v2 I've just added another folder in `parsing` that takes v3.1 and puts it onto the same intermediate graph as the other versions use. Then the rest of the code can be shared. ### Testing - Orb spec seems to work, there's a test in this PR. - The Mongo Atlas API is also 3.1, but it doesn't work yet - it's doing some things that break some of my assumptions, so will need to do a follow up PR to fix that. - If anyone knows of other 3.1 specs I could test with please shout
@ahl do you still hold that opinion with current maintenance levels? A quick glance shows rather frequent commits and going towards a 1.0.0 release? |
This continues the work from #55
There are some additional changes:
From<v3_0> for v3_1
versioned
(need a better name)large_enum_variant
allowances)