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

Update definition of the f, prefer and {bbox-input-name}-crs parameters to minimize name collisions. #405

Merged
merged 5 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/requirements/kvp-execute/REQ_bbox-crs-input-value.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ identifier:: /req/kvp-execute/bbox-crs-input-value

[.component,class=part]
--
A bbox-crs input parameter SHALL have the following characteristics:
A `inputCrs` input parameter SHALL have the following characteristics:

[source,yaml]
----
include::../../../openapi/parameters/common-crs/bbox-crs.yaml[]
----

where the token `{bbox-input-name}` represents the identifier of a bbox input parameter and the token `{bbox-input-name}-crs` represents the identifier of a corresponding input that indicates which CRS is being used for the coordinates of the `{bbox-input-name}` parameter.
where the token `{bbox-input-name}` represents the identifier of a bbox input parameter and the token `inputCrs[{bbox-input-name}]` represents the identifier of a corresponding input that indicates which CRS is being used for the coordinates of the `{bbox-input-name}` parameter.
pvretano marked this conversation as resolved.
Show resolved Hide resolved
--
====
17 changes: 11 additions & 6 deletions core/requirements/kvp-execute/REQ_f-definition.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/kvp-execute/f-definition*
^|A |The operation SHALL support a parameter `f` with the following characteristics:
^|A |The operation SHALL support a response parameter `response[f]` with the following characteristics:

[source,YAML]
----
name: f
name: response
in: query
required: false
schema:
type: string
format: uri
style: form
explode: false
type: object
required:
- f
properties:
f:
type: string
format: uri
style: deepObject
explode: true
----
|===
2 changes: 1 addition & 1 deletion core/requirements/kvp-execute/REQ_f-response.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/kvp-execute/f-response*
^|A |The `f` parameter SHALL behave in the same way that the https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.2[HTTP `Accept` header] behaves.
^|A |The `response[f]` parameter SHALL behave in the same way that the https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.2[HTTP `Accept` header] behaves.
|===
17 changes: 11 additions & 6 deletions core/requirements/kvp-execute/REQ_prefer-definition.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/kvp-execute/prefer-definition*
^|A |The operation SHALL support a parameter `prefer` with the following characteristics:
^|A |The operation SHALL support a parameter `response[prefer]` with the following characteristics:

[source,YAML]
----
name: prefer
name: response
in: query
required: false
schema:
type: string
format: uri
style: form
explode: false
type: object
required:
- prefer
properties:
prefer:
type: string
format: uri
style: deepObject
explode: true
----
|===
2 changes: 1 addition & 1 deletion core/requirements/kvp-execute/REQ_prefer-response.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/kvp-execute/f-response*
^|A |The `prefer` parameter SHALL behave in the same way that the https://datatracker.ietf.org/doc/html/rfc7240[HTTP `Prefer` header] behaves.
^|A |The `response[prefer]` parameter SHALL behave in the same way that the https://datatracker.ietf.org/doc/html/rfc7240[HTTP `Prefer` header] behaves.
|===
12 changes: 6 additions & 6 deletions core/sections/clause_15_kvp-execute.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ inputImage=s3://mybucker/myInputImage.tif&
bbox=5.8,47.2,15.1,55.1&
datetime=2019-08-09&
output=image&
f=image%2Fjpeg%3B%20q%3D0.5%2Cimage%2Fpng%20q%3D0.8
response[f]=image%2Fjpeg%3B%20q%3D0.5%2Cimage%2Fpng%20q%3D0.8
----
====

Expand All @@ -89,7 +89,7 @@ include::../requirements/kvp-execute/REQ_prefer-response.adoc[]

.Asynchronous execution.
====
In this example, the `prefer` parameter is used to indicate that asynchronous execution is preferred.
In this example, the `response[prefer]` parameter is used to indicate that asynchronous execution is preferred.

[source]
----
Expand All @@ -98,8 +98,8 @@ inputImage=s3://mybucker/myInputImage.tif&
bbox=5.8,47.2,15.1,55.1&
datetime=2019-08-09&
output=image&
f=image%2Fjpeg%3B%20q%3D0.5%2Cimage%2Fpng%20q%3D0.8&
prefer=handling%3Dlenient%2C%20wait%3D100%2C%20respond-async
response[f]=image%2Fjpeg%3B%20q%3D0.5%2Cimage%2Fpng%20q%3D0.8&
response[prefer]=handling%3Dlenient%2C%20wait%3D100%2C%20respond-async
----
====

Expand Down Expand Up @@ -414,11 +414,11 @@ An example instance value for a bounding box input named `my_bbox` might be:
my_bbox=-79.63732855116733,43.570691463538644,-79.10227279076784,43.86582298161152
----

This is the same example as above but in a different CRS. An input parameter named `my_bbox-crs` is used to convey the CRS of the `my_bbox` parameter.
This is the same example as above but in a different CRS. An input parameter named `inputCrs[my_bbox]` is used to convey the CRS of the `my_bbox` parameter.

[source]
----
my_bbox=43.570691463538644,-79.63732855116733,43.86582298161152,-79.10227279076784&my_bbox-crs=https://www.opengis.net/def/crs/EPSG/0/4326
my_bbox=43.570691463538644,-79.63732855116733,43.86582298161152,-79.10227279076784&inputCrs[my_bbox]=https://www.opengis.net/def/crs/EPSG/0/4326
----

====
Expand Down
26 changes: 16 additions & 10 deletions openapi/parameters/common-crs/bbox-crs.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: {bbox-parameter-name}-crs
name: inputCrs
description: |-
Asserts the CRS used for the coordinate values of the bbox parameter.
Asserts the CRS used for the coordinate values of a bounding
box input parameter.
in: query
required: false
schema:
type: string
format: uri
enum:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
default:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
style: form
explode: false
type: object
required:
- {bbox-input-name}
properties:
{bbox-input-name}:
type: string
pvretano marked this conversation as resolved.
Show resolved Hide resolved
format: uri
enum:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
default:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
style: deepObject
explode: true
2 changes: 1 addition & 1 deletion openapi/parameters/common-geodata/bbox.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: {bbox-parameter-name}
name: {bbox-input-name}
in: query
description: |-
Only features that have a geometry that intersects the bounding box are selected.
Expand Down
Loading