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
  •  
  •  
  •  
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 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[]
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 @@ -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 @@ -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 @@ -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 @@ -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 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 @@ -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 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