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 all commits
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
2 changes: 0 additions & 2 deletions core/requirements/core/REQ_process-summary-links.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[%metadata]
identifier:: /req/core/process-summary-links


[.component,class=part]
--
Each process summary SHALL include a link (relation: `self`) that points to the full description of the process (path: `/processes/{processID}`).
Expand All @@ -14,5 +13,4 @@ Each process summary SHALL include a link (relation: `self`) that points to the
--
Each process summary SHALL include one or more links (relation: `alternate`) that points to each alternative representation of the full description of the process (path: `/processes/{processID}`).
--

====
6 changes: 3 additions & 3 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 `{bbox-input-name}` input parameter SHALL have the following characteristics:

[source,yaml]
----
include::../../../openapi/parameters/common-crs/bbox-crs.yaml[]
include::../../../openapi/parameters/processes-core/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 `{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.
--
====
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 `my_bbox[crs]` 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&my_bbox[crs]=https://www.opengis.net/def/crs/EPSG/0/4326
----

====
Expand Down
14 changes: 0 additions & 14 deletions openapi/parameters/common-crs/bbox-crs.yaml

This file was deleted.

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
18 changes: 18 additions & 0 deletions openapi/parameters/processes-core/bbox-crs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: inputsCrs
description: |-
Asserts the CRS used for the coordinate values of a bounding
box input parameter. The name `inputsCrs` is just a generic
name to avoid ambiguity. It is ignored since explode is set
to true.
in: query
description: |-
Asserts the CRS used for the coordinate values of a bounding
box input parameter.
required: false
schema:
type: object
patternProperties:
"^.+[crs]$":
$ref: "../../schemas/processes-core/bbox-def-crs.yaml"
explode: true
style: form
10 changes: 10 additions & 0 deletions openapi/schemas/processes-core/bbox-def-crs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
anyOf:
- type: string
format: uri
enum:
- "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
- "http://www.opengis.net/def/crs/OGC/0/CRS84h"
default: "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
- type: string
format: uri
default: "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
11 changes: 1 addition & 10 deletions openapi/schemas/processes-core/bbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,4 @@ properties:
items:
type: number
crs:
anyOf:
- type: string
format: uri
enum:
- "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
- "http://www.opengis.net/def/crs/OGC/0/CRS84h"
- type: string
format: uri
default: "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
additionalProperties: false
$ref: "bbox-def-crs.yaml"
Loading