Skip to content
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 Support #637

Open
Stratus3D opened this issue Sep 27, 2024 · 2 comments
Open

OpenAPI 3.1.0 Support #637

Stratus3D opened this issue Sep 27, 2024 · 2 comments

Comments

@Stratus3D
Copy link

I'd like to use Open API Spex to generate OpenAPI 3.1 specifications that can be consumed by another system that uses JSON Schema. OpenAPI 3.1 has been out several years now and I'm wondering if support will ever be added to this library. Changes between OpenAPI 3.0 and 3.1 are minimal, but there are changes that would need to make to this library to support it. The biggest one for me right now is using multiple types to indicate a field may be null. Open API Spex does not allow a list for schema type.

Invalid schema.type. Got: [:string, :null] at /my/0/field/location

There are a few other changes, but I don't think they'd be a ton of work to implement. The bigger challenging would be supporting both 3.0 and 3.1 at the same time if that is desired. I'm happy to contribute if there is a clear path to getting this library to OpenAPI 3.1. Thanks!

@zorbash
Copy link
Contributor

zorbash commented Mar 3, 2025

Hi @Stratus3D 👋
Thanks for offering to help with this.

To support OpenAPI 3.1 we'd have to support JSON Schemas (see: oas-3.1-data-types). I think we can finally move ahead with #47. The main blocker is ex_json_schema not supporting the more recent versions of the JSON schema spec, see: jonasschmidt/ex_json_schema#73

There are some 3.1 changes which can be implemented in a backwards compatible way, one example is #654

@Stratus3D
Copy link
Author

Thanks for the update @zorbash ! I'd be happy to contribute but my open source has been taken up by asdf recently. It'll probably take me another couple weeks to wrap up my initiative on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants