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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXP

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.

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 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
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 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 @@ -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 @@ -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.
--
====
Loading
Loading