zero-rails_openapi
zero-rails_openapi copied to clipboard
Support Open API 3.1.0
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'`
According to this article, to upgrade to 3.1, may need to make these changes:
-
typekeyword supports multiple types (including null). - values accepted by
exclusiveMinimumandexclusiveMaximumis changed. -
examplekeyword is removed. - 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.