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

Initial checkin to resolve issue 373. #378

Merged
merged 4 commits into from
Mar 4, 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
2 changes: 2 additions & 0 deletions 18-062.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ include::core/sections/clause_5_conventions.adoc[]

include::core/sections/clause_6_overview.adoc[]

include::core/sections/clause_6a_deprecated.adoc[]

include::core/sections/clause_7_core.adoc[]

include::core/sections/clause_8_ogc-process-description.adoc[]
Expand Down
14 changes: 7 additions & 7 deletions core/examples/json/ConfClasses.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/core",
"http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/json",
"http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/html",
"http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/oas30"
]
}
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/core",
"http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/json",
"http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/html",
"http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/oas30"
]
}
80 changes: 40 additions & 40 deletions core/examples/json/LandingPage.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"links": [{
"href": "http://processing.example.org/oapi-p?f=application/json",
"rel": "self",
"type": "application/json",
"title": "This document"
},{
"href": "http://processing.example.org/oapi-p?f=text/html",
"rel": "alternate",
"type": "text/html",
"title": "This document as HTML"
},
{
"href": "http://processing.example.org/oapi-p/api?f=application/json",
"rel": "service-desc",
"type": "application/json",
"title": "API definition for this endpoint as JSON"
},
{
"href": "http://processing.example.org/oapi-p/api?f=text/html",
"rel": "service-desc",
"type": "text/html",
"title": "API definition for this endpoint as HTML"
},
{
"href": "http://processing.example.org/oapi-p/conformance",
"rel": "http://www.opengis.net/def/rel/ogc/1.0/conformance",
"type": "application/json",
"title": "OGC API - Processes conformance classes implemented by this server"
},
{
"href": "http://processing.example.org/oapi-p/processes",
"rel": "http://www.opengis.net/def/rel/ogc/1.0/processes",
"type": "application/json",
"title": "Metadata about the processes"
},
{
"href": "http://processing.example.org/oapi-p/jobs",
"rel": "http://www.opengis.net/def/rel/ogc/1.0/job-list",
"title": "The endpoint for job monitoring"
}]
"links": [{
"href": "http://processing.example.org/oapi-p?f=application/json",
"rel": "self",
"type": "application/json",
"title": "This document"
},{
"href": "http://processing.example.org/oapi-p?f=text/html",
"rel": "alternate",
"type": "text/html",
"title": "This document as HTML"
},
{
"href": "http://processing.example.org/oapi-p/api?f=application/json",
"rel": "service-desc",
"type": "application/json",
"title": "API definition for this endpoint as JSON"
},
{
"href": "http://processing.example.org/oapi-p/api?f=text/html",
"rel": "service-desc",
"type": "text/html",
"title": "API definition for this endpoint as HTML"
},
{
"href": "http://processing.example.org/oapi-p/conformance",
"rel": "http://www.opengis.net/def/rel/ogc/1.0/conformance",
"type": "application/json",
"title": "OGC API - Processes conformance classes implemented by this server"
},
{
"href": "http://processing.example.org/oapi-p/processes",
"rel": "http://www.opengis.net/def/rel/ogc/1.0/processes",
"type": "application/json",
"title": "Metadata about the processes"
},
{
"href": "http://processing.example.org/oapi-p/jobs",
"rel": "http://www.opengis.net/def/rel/ogc/1.0/job-list",
"title": "The endpoint for job monitoring"
}]
}
76 changes: 39 additions & 37 deletions core/examples/json/ProcessDescription.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"async-execute",
"sync-execute"
],
"outputTransmission": [
"value",
"reference"
],
"inputs": {
"stringInput": {
"title": "String Literal Input Example",
Expand Down Expand Up @@ -112,26 +108,29 @@
"geometryInput": {
"title": "Geometry input",
"description": "This is an example of a geometry input. In this case the geometry can be expressed as a GML of GeoJSON geometry.",
"minOccurs": 2,
"maxOccurs": 5,
"schema": {
"oneOf": [
{
"type": "string",
"contentMediaType": "application/gml+xml; version=3.2",
"contentSchema": "http://schemas.opengis.net/gml/3.2.1/geometryBasic2d.xsd"
},
{
"allOf": [
{
"format": "geojson-geometry"
},
{
"$ref": "http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml"
}
]
}
]
"type": "array",
"minItems": 2,
"maxItems": 5,
"items": {
"oneOf": [
{
"type": "string",
"contentMediaType": "application/gml+xml; version=3.2",
"contentSchema": "http://schemas.opengis.net/gml/3.2.1/geometryBasic2d.xsd"
},
{
"allOf": [
{
"format": "geojson-geometry"
},
{
"$ref": "http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.yaml"
}
]
}
]
}
}
},
"boundingBoxInput": {
Expand All @@ -151,21 +150,24 @@
"imagesInput": {
"title": "Inline Images Value Input",
"description": "This is an example of an image input. In this case, the input is an array of up to 150 images that might, for example, be a set of tiles. The oneOf[] conditional is used to indicate the acceptable image content types; GeoTIFF and JPEG 2000 in this case. Each input image in the input array can be included inline in the execute request as a base64-encoded string or referenced using the link.yaml schema. The use of a base64-encoded string is implied by the specification and does not need to be specified in the definition of the input.",
"minOccurs": 1,
"maxOccurs": 150,
"schema": {
"oneOf": [
{
"type": "string",
"contentEncoding": "binary",
"contentMediaType": "image/tiff; application=geotiff"
},
{
"type": "string",
"contentEncoding": "binary",
"contentMediaType": "image/jp2"
}
]
"type": "array",
"minItems": 1,
"maxItems": 150,
"items": {
pvretano marked this conversation as resolved.
Show resolved Hide resolved
"oneOf": [
{
"type": "string",
"contentEncoding": "binary",
"contentMediaType": "image/tiff; application=geotiff"
},
{
"type": "string",
"contentEncoding": "binary",
"contentMediaType": "image/jp2"
}
]
}
}
},
"featureCollectionInput": {
Expand Down
10 changes: 3 additions & 7 deletions core/examples/json/ProcessList.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"processes": [
{
"id": "EchoProcess",
"title": "EchoProcess",
"version": "1.0.0",
"id": "EchoProcess",
"title": "EchoProcess",
"version": "1.0.0",
"jobControlOptions": [
"async-execute",
"sync-execute"
],
"outputTransmission": [
"value",
"reference"
],
"links": [
{
"href": "https://processing.example.org/oapi-p/processes/EchoProcess",
Expand Down
2 changes: 2 additions & 0 deletions core/requirements/core/REQ_process-execute-input-array.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ The server SHALL support process input values encoded as an array.
This SHALL be true even if the input consists of a single value.
--
====

NOTE: This requirement is deprecated and will be removed in a subsequence version of this standard. Inputs with cardinalities greater than 1 should be defined using a https://json-schema.org/draft/2020-12/json-schema-core#section-10.3.1[JSON-Schema array] in the `schema` member of the <<process-input-schema,input definition>>. See <<deprecated-maxOccurs>> for details.
2 changes: 1 addition & 1 deletion core/requirements/kvp-execute/REQ_input-cardinality.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ identifier:: /req/kvp-execute/input-cardinality
[.component,class=conditions]
--
. The process input value is specified in-line in an execute request.
. A process input, with identifier `{input-name}`, is defined as having a cardinality greater than one (i.e. `minOccurs` > 1) in the <<sc_process_description,process description>>.
. A process input, with identifier `{input-name}`, is defined as having a cardinality greater than one (i.e. `minItems` > 1) in the <<sc_process_description,process description>>.
. The number of input values specified for the `{input-name}` process input is greater than one.
--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ The server SHALL support process input values encoded as an array.
This SHALL be true even if the input consists of a single value.
--
====

NOTE: This requirement is deprecated and will be removed in a subsequence version of this standard. Inputs with cardinalities greater than 1 should be defined using JSON-Schema arrays in the `schema` member of the <<process-input-schema,input definition>>. See <<deprecated-maxOccurs>> for details.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
identifier:: /req/ogc-process-description/inputs-def
[.component,class=part]
--
Each process input definition SHALL be listed in the `inputs` section according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/inputDescription.yaml[inputDescription.yaml].
Each process <<process-input-schema,input definition>> SHALL be listed in the `inputs` section according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/inputDescription.yaml[inputDescription.yaml].
--

[.component,class=part]
Expand Down
29 changes: 29 additions & 0 deletions core/sections/clause_6a_deprecated.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

[[deprecated]]
== Deprecated

[[deprecated-maxOccurs]]
=== `maxOccurs` parameter

The <<ogc_process_description,"OGC Process Description">> requirements class makes use of the <<process-input-schema,`maxOccurs`>> parameter to set the maximum cardinality of a process input. This standard deprecates the use of this parameter and implementors should be aware that it will be removed in subsequent versions of this document.

Instead, setting the cardinality of an input beyond 1 should be done using a https://json-schema.org/draft/2020-12/json-schema-core#section-10.3.1[JSON-Schema array] with the https://json-schema.org/draft/2020-12/json-schema-validation#section-6.4.2[`minItems`] and https://json-schema.org/draft/2020-12/json-schema-validation#section-6.4.1[`maxItems`] parameters in the input's schema specified using the <<process-input-schema,schema>> member.

Furthermore, the value of the `minOccurs` parameter is constrained to the values "0" or "1".

Requirement <<req_core_process-execute-input-array,/req/core/process-execute-input-array>> is also deprecated.

With reference to <<cardinality_rules>>, for implementors wishing to maintain backward compatability with the behaviour when `minOccurs` is "1" and `maxOccurs` is greater than "1", the following schema fragment should be used:

[source,YAML]
----
schema:
oneOf:
- <original-schema>
- type: array
items: <original-schema>
minItems: 1
maxItems: N
----
pvretano marked this conversation as resolved.
Show resolved Hide resolved

where the token "<original-schema>" represents the schema of the input when encoded using the `minOccurs` and `maxOccurs` parameters.
Loading
Loading