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

Support Open API 3.1.0 #79

Open
barnaclebarnes opened this issue Aug 16, 2024 · 1 comment
Open

Support Open API 3.1.0 #79

barnaclebarnes opened this issue Aug 16, 2024 · 1 comment

Comments

@barnaclebarnes
Copy link

I'm trying to use Scooma to validate the API but it requires OpenAPI 3.1.0. I'm not sure if there are any breaking changes that affect the generator - https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0

Either we can change this to hard code 3.1.0 or allow overriding this in the config?

# lib/open_api.rb:52
`openapi: '3.0.0'`
@zhandao
Copy link
Owner

zhandao commented Aug 16, 2024

According to this article, to upgrade to 3.1, may need to make these changes:

  1. type keyword supports multiple types (including null).
  2. values accepted by exclusiveMinimum and exclusiveMaximum is changed.
  3. example keyword is removed.
  4. the way to describe file uploads is changed (and I'm not sure if the 3.0 writing (type: string format: binary) is still compatible).

If your JSON does not involve the above issues, you can hard code it to 3.1.

Maybe I can make a configurable version, but it seems better to reslove the above issues first.

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