-
Notifications
You must be signed in to change notification settings - Fork 26
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
Move from OpenAPI 3.0 to OpenAPI 3.1 #580
Comments
@m-burgoyne @tomkralidis @ghobona I support the move to OpenAPI V3.1 . Let's discuss at the next EDR API SWG. The changed schema for extent.yaml probably does not warrant a major release (V2!), and we can include in V1.2. |
EDR API SWG 122 2024-10-03 agreed to move to OpenAPI V3.1. @cmheazel agreed to investigate whther OGC API-common could support both versions cleanly for all APIs. |
API Common section 6.6.2 states "This Standard includes a conformance class for OGC API definitions that follow the OpenAPI specification 3.0. Alternative API definition languages are also allowed. Conformance classes for additional API definition languages will be added as the OGC API landscape continues to evolve." |
If a service supported multiple versions of OpenAPI one approach would be to use the format parameter f 3.0 if a version is not specified in the request the default would be the newest version of OpenAPI defined in the conformance classes |
@m-burgoyne good suggestion. I would make one modification -- API Common defines a "link" structure based on XLink. This structure includes a "type" property: So rather than use the "f" parameter, I would use the "type" property of the link to the OAS document. |
@cmheazel The debate about |
@chris-little What we agree on is the use of MIME types (e.x. application/openapi+yaml;version=3.1). This will allow an EDR API to provide OAS documents using any version of the OAS standard. |
OpenAPI 3.1 was released in February 2021 and is fully aligned with JSON Schema, upgrading the OGC-EDR API to use OpenAPI schema 3.1 will remove the need to convert 3rd party data schemas that are based on the JSON Schema standard into a form compatible with OpenAPI 3.0.
As OpenAPI 3.1 has been the default standard for several years it will increasingly be the version that software tools are configured to expect.
There would be one breaking change as OpenAPI schema 3.1 no longer supports nullable (JSON Schema allows for arrays of types which is much more flexible), this would require changes to the extent.yaml definition. Although not a required change the migration docs also recommend changing example values to examples arrays.
The text was updated successfully, but these errors were encountered: