From 5d0cfa323b6a1206e8af14378199378b6593c2c5 Mon Sep 17 00:00:00 2001 From: Panagiotis Vretanos Date: Sun, 10 Dec 2023 22:19:26 -0500 Subject: [PATCH] Undo deprecation of minOccurs and maxOccurs. --- 18-062.adoc | 2 - core/examples/json/ProcessDescription.json | 65 ++++++++----------- .../core/REQ_process-execute-input-array.adoc | 2 - .../kvp-execute/REQ_input-cardinality.adoc | 2 +- .../old/REQ_process-execute-input-array.adoc | 2 - core/sections/clause_6a_deprecated.adoc | 29 --------- core/sections/clause_7_core.adoc | 31 ++++----- .../clause_8_ogc-process-description.adoc | 34 ++++------ 8 files changed, 52 insertions(+), 115 deletions(-) delete mode 100644 core/sections/clause_6a_deprecated.adoc diff --git a/18-062.adoc b/18-062.adoc index fdc96332..666bc33c 100644 --- a/18-062.adoc +++ b/18-062.adoc @@ -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[] diff --git a/core/examples/json/ProcessDescription.json b/core/examples/json/ProcessDescription.json index 5a14e871..e33c03a3 100644 --- a/core/examples/json/ProcessDescription.json +++ b/core/examples/json/ProcessDescription.json @@ -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": { @@ -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": { diff --git a/core/requirements/core/REQ_process-execute-input-array.adoc b/core/requirements/core/REQ_process-execute-input-array.adoc index b3512174..76e37971 100644 --- a/core/requirements/core/REQ_process-execute-input-array.adoc +++ b/core/requirements/core/REQ_process-execute-input-array.adoc @@ -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 <>. See <> for details. diff --git a/core/requirements/kvp-execute/REQ_input-cardinality.adoc b/core/requirements/kvp-execute/REQ_input-cardinality.adoc index 7ec3a77e..0a7c3129 100644 --- a/core/requirements/kvp-execute/REQ_input-cardinality.adoc +++ b/core/requirements/kvp-execute/REQ_input-cardinality.adoc @@ -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 <>. +. A process input, with identifier `{input-name}`, is defined as having a cardinality greater than one (i.e. `minOccurs` > 1) in the <>. . The number of input values specified for the `{input-name}` process input is greater than one. -- diff --git a/core/requirements/kvp-execute/old/REQ_process-execute-input-array.adoc b/core/requirements/kvp-execute/old/REQ_process-execute-input-array.adoc index 4ce0d856..76e37971 100644 --- a/core/requirements/kvp-execute/old/REQ_process-execute-input-array.adoc +++ b/core/requirements/kvp-execute/old/REQ_process-execute-input-array.adoc @@ -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 <>. See <> for details. diff --git a/core/sections/clause_6a_deprecated.adoc b/core/sections/clause_6a_deprecated.adoc deleted file mode 100644 index 59f3976b..00000000 --- a/core/sections/clause_6a_deprecated.adoc +++ /dev/null @@ -1,29 +0,0 @@ - -[[deprecated]] -== Deprecated - -[[deprecated-maxOccurs]] -=== `maxOccurs` parameter - -The <> requirements class makes use of the <> 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 <> member. - -Furthermore, the value of the `minOccurs` parameter is constrained to the values "0" or "1". - -Requirement <> is also deprecated. - -With reference to <>, 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: - - - - type: array - items: - minItems: 1 - maxItems: N ----- - -where the token "" represents the schema of the input when encoded using the `minOccurs` and `maxOccurs` parameters. diff --git a/core/sections/clause_7_core.adoc b/core/sections/clause_7_core.adoc index 8b9f8828..69ca7d98 100644 --- a/core/sections/clause_7_core.adoc +++ b/core/sections/clause_7_core.adoc @@ -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 <> for details. - The cardinality on an input is specified using the `minOccurs` and `maxOccurs` parameters from the input's definition in the <>. 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]] @@ -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] ---- @@ -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" + } + ] } }, ---- diff --git a/core/sections/clause_8_ogc-process-description.adoc b/core/sections/clause_8_ogc-process-description.adoc index 7868d09e..36658ccb 100644 --- a/core/sections/clause_8_ogc-process-description.adoc +++ b/core/sections/clause_8_ogc-process-description.adoc @@ -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" + } + ] } } ----