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

Add OpenAPI 3.1 support #590

Merged
merged 15 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 9 additions & 4 deletions .github/workflows/build-openapi-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,25 @@ jobs:
- name: Setup npm
uses: actions/setup-node@v4
- name: Install dependencies
run: npm install -g @apidevtools/swagger-cli
run: npm install @redocly/cli -g
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Generate OpenAPI bundle
- name: Generate OpenAPI 3.0 bundle
run: |
cd core/standard/openapi
swagger-cli bundle -o /tmp/ogcapi-environmental-data-retrieval-1.bundled.json ogcapi-environmental-data-retrieval-1.yaml
redocly bundle -o /tmp/ogcapi-environmental-data-retrieval-1-oas30.bundled.json ogcapi-environmental-data-retrieval-1-oas30.yaml
- name: Generate OpenAPI 3.1 bundle
run: |
cd core/standard/openapi
redocly bundle -o /tmp/ogcapi-environmental-data-retrieval-1.bundled-oas31.json ogcapi-environmental-data-retrieval-1-oas31.yaml
- name: Commit changes and push
run: |
git config --global user.email "tomkralidis@gmail.com"
git config --global user.name "Tom Kralidis"
mv -f /tmp/ogcapi-environmental-data-retrieval-1.bundled.json .
mv -f /tmp/ogcapi-environmental-data-retrieval-1-oas30.bundled.json .
mv -f /tmp/ogcapi-environmental-data-retrieval-1-oas31.bundled.json .
if [[ `git status --porcelain` ]]; then
git add .
git commit -am "Updating OpenAPI build"
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test-build-openapi-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@ jobs:
- name: Setup npm
uses: actions/setup-node@v4
- name: Install dependencies
run: npm install -g @apidevtools/swagger-cli
run: npm install @redocly/cli -g
- name: Checkout
uses: actions/checkout@master
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
#with:
# fetch-depth: 0
- name: Generate OpenAPI bundle
- name: Generate OpenAPI 3.0 bundle
run: |
cd core/standard/openapi
swagger-cli bundle -o ogcapi-environmental-data-retrieval-1.bundled.json ogcapi-environmental-data-retrieval-1.yaml
redocly bundle -o ogcapi-environmental-data-retrieval-1-oas30.bundled.json ogcapi-environmental-data-retrieval-1-oas30.yaml
- name: Generate OpenAPI 3.1 bundle
run: |
cd core/standard/openapi
redocly bundle -o ogcapi-environmental-data-retrieval-1-oas31.bundled.json ogcapi-environmental-data-retrieval-1-oas31.yaml

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER A

THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.

This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.
This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license SHALL require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.
chris-little marked this conversation as resolved.
Show resolved Hide resolved

Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications. This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it.
Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property SHALL not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and SHALL at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications. This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement SHALL be deemed unenforceable, void or invalid, such provision SHALL be modified so as to make it valid and enforceable, and as so modified the entire Agreement SHALL remain in full force and effect. No decision, action or inaction by LICENSOR SHALL be construed to be a waiver of any rights or remedies available to it.
2 changes: 1 addition & 1 deletion README.md
chris-little marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,6 @@ The Working Group is now developing a backwards-compatible V1.1 and future enhan

### Contributing

The contributor understands that any contributions, if accepted by the OGC Membership, shall be incorporated into OGC standards documents and that all copyright and intellectual property shall be vested to the OGC.
The contributor understands that any contributions, if accepted by the OGC Membership, SHALL be incorporated into OGC standards documents and that all copyright and intellectual property SHALL be vested to the OGC.

Pull Requests from contributors are welcomed. However, please note that by sending a Pull Request or Commit to this GitHub repository, you are agreeing to the terms in the Observer Agreement https://portal.ogc.org/files/?artifact_id=92169
2 changes: 1 addition & 1 deletion core/standard/abstract_tests/ATS_class_oas30.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[[ats_oas3]]
[[ats_oas30]]
[conformance_class]
.OpenAPI 3.0
====
Expand Down
28 changes: 28 additions & 0 deletions core/standard/abstract_tests/ATS_class_oas31.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[[ats_oas31]]
[conformance_class]
.OpenAPI 3.1
====
[%metadata]
identifier:: https://www.opengis.net/spec/ogcapi-edr-1/1.2/conf/oas31
subject:: <<rc_oas31,https://www.opengis.net/spec/ogcapi-edr-1/1.2/req/oas31>>
classification:: Target Type:Web API
inherit:: https://www.opengis.net/spec/ogcapi-edr-1/1.2/conf/core
conformance-test:: /conf/oas31/completeness
conformance-test:: /conf/oas31/exceptions-codes
conformance-test:: /conf/oas31/oas-definition-1
conformance-test:: /conf/oas31/oas-definition-2
conformance-test:: /conf/oas31/oas-impl
conformance-test:: /conf/oas31/security
====

include::oas31/ATS_completeness.adoc[]

include::oas31/ATS_exception-codes.adoc[]

include::oas31/ATS_definition-1.adoc[]

include::oas31/ATS_definition-2.adoc[]

include::oas31/ATS_oas-impl.adoc[]

include::oas31/ATS_security.adoc[]
2 changes: 1 addition & 1 deletion core/standard/abstract_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ The test is expressed according to this pattern:
* <<req_cc_req,Requirement /req/cc/req>>
````

NOTE: for each test, there shall be one or more requirements in the "requirements" folder.
NOTE: for each test, there SHALL be one or more requirements in the "requirements" folder.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test-purpose:: Validate that the coords query parameters are constructed correct
test-method::
+
--
Verify that the `coords` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `coords` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ test-method::
--
. Verify that only resources that have a spatial geometry that intersects the coordinates are returned as part of the result set.
. Verify `coords` values are valid for the specified coordinate reference system
. Verify that the coordinate reference system of the geometries is valid for the parameter defined by `crs`. If the `crs` parameter is not defined the geometries shall be valid for the coordinate reference system defined by the spatial element of the extent section in the collection response.
. Verify that the coordinate reference system of the geometries is valid for the parameter defined by `crs`. If the `crs` parameter is not defined the geometries SHALL be valid for the coordinate reference system defined by the spatial element of the extent section in the collection response.
--
====
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test-purpose:: Validate that the `corridor-height` query parameter is constructe
test-method::
+
--
Verify that the `corridor-height` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `corridor-height` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test-purpose:: Validate that the `corridor-width` query parameter is constructed
test-method::
+
--
Verify that the `corridor-width` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `corridor-width` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test-purpose:: Validate that the crs query parameters are constructed correctly.
test-method::
+
--
Verify that the `crs` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `crs` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test-purpose:: Validate that any custom query parameters are constructed correct
test-method::
+
--
Verify that any <<rc_custom-dimensions-section,custom dimension>> query parameters comply with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that any <<rc_custom-dimensions-section,custom dimension>> query parameters comply with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test-purpose:: Validate that the `f` query parameter is constructed correctly.
test-method::
+
--
Verify that the `f` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `f` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test-purpose:: Validate that the `height-units` query parameter is constructed c
test-method::
+
--
Verify that the `within-units` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `within-units` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test-purpose:: Validate that the limit query parameters are defined correctly.
test-method::
+
--
Verify that the `limit` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `limit` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
^|*Abstract Test {ats-id}* |*/conf/edr/rc-max-z-definition*
^|Test Purpose |Validate that the minimum vertical level query parameters are constructed correctly.
^|Requirement |<<req_edr_max-z-definition,/req/edr/max-z-definition>>
^|Test Method |Verify that the `max-z` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
^|Test Method |Verify that the `max-z` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
[width="90%",cols="3",options="header"]
|===
|Format |Schema Document |Test ID
|HTML |link:https://schemas.opengis.net/ogcapi/edr/1.2/openapi/schemas/collections/collection.yaml[collection.yaml]|<<ats_html_content,/conf/html/content>>
|JSON |link:https://schemas.opengis.net/ogcapi/edr/1.2/openapi/schemas/collections/collection.yaml[collection.yaml] |<<ats_json_content,/conf/json/content>>
|HTML |link:https://schemas.opengis.net/ogcapi/edr/1.2/openapi/oas31/schemas/collections/collection.yaml[collection.yaml]|<<ats_html_content,/conf/html/content>>
|JSON |link:https://schemas.opengis.net/ogcapi/edr/1.2/openapi/oas31/schemas/collections/collection.yaml[collection.yaml] |<<ats_json_content,/conf/json/content>>
|===
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
[width="90%",cols="3",options="header"]
|===
|Format |Schema Document |Test ID
|HTML |link:https://schemas.opengis.net/ogcapi/edr/1.2/openapi/schemas/collections/collections.yaml[collections.yaml]|<<ats_html_content,/conf/html/content>>
|JSON |link:https://schemas.opengis.net/ogcapi/edr/1.2/openapi/schemas/collections/collections.yaml[collections.yaml] |<<ats_geojson_content,/conf/geojson/content>>
|HTML |link:https://schemas.opengis.net/ogcapi/edr/1.2/openapi/oas31/schemas/collections/collections.yaml[collections.yaml]|<<ats_html_content,/conf/html/content>>
|JSON |link:https://schemas.opengis.net/ogcapi/edr/1.2/openapi/oas31/schemas/collections/collections.yaml[collections.yaml] |<<ats_geojson_content,/conf/geojson/content>>
|===
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
^|*Abstract Test {ats-id}* |*/conf/edr/rc-min-z-definition*
^|Test Purpose |Validate that the minimum vertical level query parameters are constructed correctly.
^|Requirement |<<req_collections_rc-min-z-definition,/req/edr/min-z-definition>>
^|Test Method |Verify that the `min-z` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
^|Test Method |Verify that the `min-z` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test-purpose:: Validate that the parameter-name query parameters are constructed
test-method::
+
--
Verify that the `parameter-name` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `parameter-name` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test-purpose:: Validate that the `width-units` query parameter is constructed co
test-method::
+
--
Verify that the `width-units` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `width-units` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test-purpose:: Validate that the vertical level query parameters are constructed
test-method::
+
--
Verify that the `z` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `z` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test-purpose:: Validate that the coords query parameters are constructed correct
test-method::
+
--
Verify that the `coords` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `coords` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ test-method::
--
. Verify that only resources that have a spatial geometry that intersects the coordinates are returned as part of the result set.
. Verify `coords` values are valid for the specified coordinate reference system
. Verify that the coordinate reference system of the geometries is valid for the parameter defined by `crs`. If the `crs` parameter is not defined the geometries shall be valid for the coordinate reference system defined by the spatial element of the extent section in the collection response.
. Verify that the coordinate reference system of the geometries is valid for the parameter defined by `crs`. If the `crs` parameter is not defined the geometries SHALL be valid for the coordinate reference system defined by the spatial element of the extent section in the collection response.
--
====
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test-purpose:: Validate that the crs query parameters are constructed correctly.
test-method::
+
--
Verify that the `crs` query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that the `crs` query parameter complies with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test-purpose:: Validate that any custom query parameters are constructed correct
test-method::
+
--
Verify that any <<rc_custom-dimensions-section,custom dimension>> query parameters comply with the following definition (using an OpenAPI Specification 3.0 fragment):
Verify that any <<rc_custom-dimensions-section,custom dimension>> query parameters comply with the following definition (using an OpenAPI Specification 3.1 fragment):

[source,YAML]
----
Expand Down
Loading
Loading