Skip to content

Commit

Permalink
Undo deprecation of minOccurs and maxOccurs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvretano committed Dec 11, 2023
1 parent 7dc3465 commit 5d0cfa3
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 115 deletions.
2 changes: 0 additions & 2 deletions 18-062.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ 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
65 changes: 26 additions & 39 deletions core/examples/json/ProcessDescription.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,29 +108,19 @@
"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": {
"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"
}
]
}
]
}
"oneOf": [
{
"type": "string",
"contentMediaType": "application/gml+xml; version=3.2",
"contentSchema": "http://schemas.opengis.net/gml/3.2.1/geometryBasic2d.xsd"
},
{
"format": "geojson-geometry"
}
]
}
},
"boundingBoxInput": {
Expand All @@ -150,24 +140,21 @@
"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": {
"type": "array",
"minItems": 1,
"maxItems": 150,
"items": {
"oneOf": [
{
"type": "string",
"contentEncoding": "binary",
"contentMediaType": "image/tiff; application=geotiff"
},
{
"type": "string",
"contentEncoding": "binary",
"contentMediaType": "image/jp2"
}
]
}
"oneOf": [
{
"type": "string",
"contentEncoding": "binary",
"contentMediaType": "image/tiff; application=geotiff"
},
{
"type": "string",
"contentEncoding": "binary",
"contentMediaType": "image/jp2"
}
]
}
},
"featureCollectionInput": {
Expand Down
2 changes: 0 additions & 2 deletions core/requirements/core/REQ_process-execute-input-array.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ 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. `minItems` > 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. `minOccurs` > 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,5 +18,3 @@ 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.
29 changes: 0 additions & 29 deletions core/sections/clause_6a_deprecated.adoc

This file was deleted.

31 changes: 13 additions & 18 deletions core/sections/clause_7_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,6 @@ The actual name of each input is its identifier as specified by the input's defi

====== Cardinality

NOTE: The `maxOccurs` parameter is deprecated in this standard and will be removed in a subsequent version of this document. See <<deprecated-maxOccurs>> for details.

The cardinality on an input is specified using the `minOccurs` and `maxOccurs` parameters from the input's definition in the <<sc_process_description,process description>>. The default values of `minOccurs` and `maxOccurs` are 1 indicating that a single input of the corresponding name must be specified in an execute request. The following table covers the various combinations of `minOccurs` and `maxOccurs` values.

[[cardinality_rules]]
Expand Down Expand Up @@ -587,7 +585,7 @@ inputs:
----

In this case, the schema of the input is defined as a plain string with a cardinality of 2. Inputs with cardinalities of greater than 1 are encoded as arrays in an execute request. This situation is equivalently encoded to the previous row. +
Servers, however, being internally aware of the definition of each input, can disambiguate the input values acordingly (treating the values in the first example as string values and the values in the this example as arrays of values).
Servers, however, being internally aware of the definition of each input, can disambiguate the input values accordingly (treating the values in the first example as string values and the values in the this example as arrays of values).
|
[source,JSON]
----
Expand Down Expand Up @@ -832,22 +830,19 @@ In this second example, the property, `geometryInput` has a cardinality of great
"geometryInput": {
"title": "Geometry input",
"description": "This is an example of a geometry input. In this case the geometry can be expressed as a GML or GeoJSON geometry.",
"minOccurs": 2,
"maxOccurs": 5,
"schema": {
"type": "array",
"minItem": 2,
"maxItem": 5,
"itemType": {
"oneOf": [
{
"type": "string",
"contentMediaType": "application/gml+xml; version=3.2",
"contentSchema": "http://schemas.opengis.net/gml/3.2.1/geometryBasic2d.xsd"
},
{
"$ref": "http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.json"
}
]
}
"oneOf": [
{
"type": "string",
"contentMediaType": "application/gml+xml; version=3.2",
"contentSchema": "http://schemas.opengis.net/gml/3.2.1/geometryBasic2d.xsd"
},
{
"$ref": "http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/geometryGeoJSON.json"
}
]
}
},
----
Expand Down
34 changes: 12 additions & 22 deletions core/sections/clause_8_ogc-process-description.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,19 @@ The following JSON Schema fragment illustrates the use of the `format` key to in
"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": {
"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"
}
]
}
]
}
"oneOf": [
{
"type": "string",
"contentMediaType": "application/gml+xml; version=3.2",
"contentSchema": "http://schemas.opengis.net/gml/3.2.1/geometryBasic2d.xsd"
},
{
"format": "geojson-geometry"
}
]
}
}
----
Expand Down

0 comments on commit 5d0cfa3

Please sign in to comment.