From 8060aacb74fd824aa62e46835344de017c6c4abf Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 21 Jan 2020 12:48:44 +0100 Subject: [PATCH 1/7] Renamed trim and labels to be more specific, added array_labels. --- CHANGELOG.md | 4 +++- array_labels.json | 35 ++++++++++++++++++++++++++++ labels.json => dimension_labels.json | 2 +- trim.json => trim_cube.json | 2 +- 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 array_labels.json rename labels.json => dimension_labels.json (97%) rename trim.json => trim_cube.json (96%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83cf7249..77122fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `array_apply` - `array_filter` - `array_find` + - `array_labels` + - `dimension_labels` - `drop_dimension` - `filter_labels` - - `labels` - `load_uploaded_files` - `mask_polygon` - `reduce_dimension` @@ -58,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The following operations work on two values instead on a sequence of values: `and`, `divide`, `multiply`, `or`, `subtract`, `xor`. [#85](https://github.com/Open-EO/openeo-processes/issues/85) - `product` works as before, but is not an alias of `multiply` any longer. [#85](https://github.com/Open-EO/openeo-processes/issues/85) - `text_begins`, `text_contains`, `text_ends`: `null` values are supported and get passed through. +- `trim`: Renamed to `trim_cube`. ### Deprecated - `filter_bbox`, `load_collection`, `resample_spatial`: PROJ definitions are deprecated in favor of EPSG codes and WKT2. [#58](https://github.com/Open-EO/openeo-processes/issues/58) diff --git a/array_labels.json b/array_labels.json new file mode 100644 index 00000000..3e3136a4 --- /dev/null +++ b/array_labels.json @@ -0,0 +1,35 @@ +{ + "id": "array_labels", + "summary": "Get the labels for an array", + "description": "Returns all labels for a labeled array in the data cube. The labels have the same order as in the array.", + "categories": [ + "arrays" + ], + "parameters": [ + { + "name": "data", + "description": "An array with labels.", + "schema": { + "type": "array", + "subtype": "labeled-array" + }, + "required": true + } + ], + "returns": { + "description": "The labels as array.", + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + } + } +} \ No newline at end of file diff --git a/labels.json b/dimension_labels.json similarity index 97% rename from labels.json rename to dimension_labels.json index 0d5c2095..504b62d5 100644 --- a/labels.json +++ b/dimension_labels.json @@ -1,5 +1,5 @@ { - "id": "labels", + "id": "dimension_labels", "summary": "Get the dimension labels", "description": "Returns all labels for a dimension in the data cube. The labels have the same order as in the data cube.", "categories": [ diff --git a/trim.json b/trim_cube.json similarity index 96% rename from trim.json rename to trim_cube.json index b824ac8d..fceebe42 100644 --- a/trim.json +++ b/trim_cube.json @@ -1,5 +1,5 @@ { - "id": "trim", + "id": "trim_cube", "summary": "Remove slices with no-data values", "description": "Removes slices solely containing no-data values. If the dimension is irregular categorical then slices in the middle can be removed.", "categories": [ From 82d82aab86e8c60a586b39ff1114f3ec0bb41886 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 21 Jan 2020 12:55:10 +0100 Subject: [PATCH 2/7] Added support for labels to processes. --- CHANGELOG.md | 7 +++++-- aggregate_polygon.json | 3 ++- aggregate_temporal.json | 3 ++- apply_dimension.json | 3 ++- array_apply.json | 13 +++++++++---- array_contains.json | 2 +- array_element.json | 21 +++++++++++++-------- array_filter.json | 13 +++++++++---- array_find.json | 31 +++++++++++++++++++------------ reduce_dimension.json | 3 ++- resample_cube_temporal.json | 3 ++- tests/.words | 3 ++- tests/processes.test.js | 1 + 13 files changed, 69 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77122fd9..563010f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `all` - `any` - `array_apply` + - `array_contains` - `array_filter` - `array_find` - `array_labels` @@ -24,7 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `reduce_dimension` - `reduce_dimension_binary` - `rename_labels` -- Added further examples +- Support for labeled arrays. [API#245](https://github.com/Open-EO/openeo-api/issues/245) +- Added further examples. ### Changed - The JSON Schema keyword `format` has been replaced with the custom keyword `subtype`. @@ -35,9 +37,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Processes supporting multiple data types in parameters or return values with `anyOf` are now listing the data types directly as array. `anyOf` is discouraged. - Comparison processes `eq`, `gt`, `gte`, `lt`, `lte`, `neq` and `between` accept all data types as input for the operands. - `add_dimension`: Parameter `value` renamed to `label`. -- `apply_dimension`: Replaced with a completely new definition. [#73](https://github.com/Open-EO/openeo-processes/issues/73) +- `aggregate_polygon`, `aggregate_polygon`, `apply_dimension`, `array_element` and `resample_cube_temporal`: Support labeled arrays. [API#245](https://github.com/Open-EO/openeo-api/issues/245) - `aggregate_polygon`: The data cube implicitly gets restricted to the bounds of the polygons as if `filter_polygon` would have been used beforehand. [#101](https://github.com/Open-EO/openeo-processes/issues/101) - `aggregate_temporal`: Parameter `labels` is optional. [#19](https://github.com/Open-EO/openeo-processes/issues/19) +- `apply_dimension`: Replaced with a completely new definition. [#73](https://github.com/Open-EO/openeo-processes/issues/73) - `apply_kernel`: Only supported 2D kernels on the horizontal spatial dimensions. [#69](https://github.com/Open-EO/openeo-processes/issues/69) - `clip`: Works on a single value instead on arrays (replaced parameter `data` with `x`). [#75](https://github.com/Open-EO/openeo-processes/issues/75) - `count`: Renamed parameter `expression` to `condition`. diff --git a/aggregate_polygon.json b/aggregate_polygon.json index 72b8ed05..e5b02b32 100644 --- a/aggregate_polygon.json +++ b/aggregate_polygon.json @@ -40,10 +40,11 @@ "parameters": [ { "name": "data", - "description": "An array with elements of any type.", + "description": "A labeled array with values of any type.", "required": true, "schema": { "type": "array", + "subtype": "labeled-array", "items": { "description": "Any data type." } diff --git a/aggregate_temporal.json b/aggregate_temporal.json index c69a49c1..22a7df58 100644 --- a/aggregate_temporal.json +++ b/aggregate_temporal.json @@ -89,10 +89,11 @@ "parameters": [ { "name": "data", - "description": "An array with elements of any type.", + "description": "A labeled array with elements of any type.", "required": true, "schema": { "type": "array", + "subtype": "labeled-array", "items": { "description": "Any data type." } diff --git a/apply_dimension.json b/apply_dimension.json index b5d2c2e7..022a8a2b 100644 --- a/apply_dimension.json +++ b/apply_dimension.json @@ -24,10 +24,11 @@ "parameters": [ { "name": "data", - "description": "An array with elements of any type.", + "description": "A labeled array with elements of any type.", "required": true, "schema": { "type": "array", + "subtype": "labeled-array", "items": { "description": "Any data type." } diff --git a/array_apply.json b/array_apply.json index 5f6aaccf..2152d433 100644 --- a/array_apply.json +++ b/array_apply.json @@ -34,11 +34,16 @@ }, { "name": "index", - "description": "The zero-based index of the current element being processed.", + "description": "The zero-based index or the label of the current element being processed. Labels take preference over indices.", "required": true, - "schema": { - "type": "integer" - } + "schema": [ + { + "type": "number" + }, + { + "type": "string" + } + ] } ] }, diff --git a/array_contains.json b/array_contains.json index 763477df..13b89377 100644 --- a/array_contains.json +++ b/array_contains.json @@ -1,7 +1,7 @@ { "id": "array_contains", "summary": "Check whether the array contains a given value", - "description": "Checks whether the array specified for `data` contains the value specified in `value`. Returns `true` if there's a match, otherwise `false`.\n\n**Remarks:**\n\n* To get the index of the value found, use ``array_find()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.", + "description": "Checks whether the array specified for `data` contains the value specified in `value`. Returns `true` if there's a match, otherwise `false`.\n\n**Remarks:**\n\n* To get the index or the label of the value found, use ``array_find()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.", "categories": [ "arrays", "comparison" diff --git a/array_element.json b/array_element.json index e85c33e8..bab3941d 100644 --- a/array_element.json +++ b/array_element.json @@ -1,7 +1,7 @@ { "id": "array_element", "summary": "Get an element from an array", - "description": "Returns the element at the specified zero-based index from the array.", + "description": "Returns the element with the specified index or label from the array.", "categories": [ "arrays" ], @@ -19,15 +19,20 @@ }, { "name": "index", - "description": "The zero-based index of the element to retrieve.", - "schema": { - "type": "integer" - }, + "description": "The zero-based index or the label of the element to retrieve. Labels take preference over indices.", + "schema": [ + { + "type": "number" + }, + { + "type": "string" + } + ], "required": true }, { "name": "return_nodata", - "description": "By default this process throws an `IndexOutOfBounds` exception if the index is invalid. If you want to return `null` instead, set this flag to `true`.", + "description": "By default this process throws an `ArrayElementNotAvailable` exception if the index or label is invalid. If you want to return `null` instead, set this flag to `true`.", "schema": { "type": "boolean" }, @@ -41,8 +46,8 @@ } }, "exceptions": { - "IndexOutOfBounds": { - "message": "The array has no element with the specified index." + "ArrayElementNotAvailable": { + "message": "The array has no element with the specified index or label." } }, "examples": [ diff --git a/array_filter.json b/array_filter.json index 88d27ef1..fbaff1be 100644 --- a/array_filter.json +++ b/array_filter.json @@ -35,11 +35,16 @@ }, { "name": "index", - "description": "The zero-based index of the current element being processed.", + "description": "The zero-based index or the label of the current element being processed. Labels take preference over indices.", "required": true, - "schema": { - "type": "integer" - } + "schema": [ + { + "type": "number" + }, + { + "type": "string" + } + ] } ] }, diff --git a/array_find.json b/array_find.json index 39e5f3b7..a6d9fccf 100644 --- a/array_find.json +++ b/array_find.json @@ -1,7 +1,7 @@ { "id": "array_find", - "summary": "Get the index for a value in an array", - "description": "Checks whether the array specified for `data` contains the value specified in `value` and returns the zero-based index for the first match. If there's no match, `-1` is returned.\n\n**Remarks:**\n\n* To get a boolean value returned use ``array_contains()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.", + "summary": "Get the index/label for a value in an array", + "description": "Checks whether the array specified for `data` contains the value specified in `value` and returns the zero-based index or the label for the first match. If there's no match, `-1` is returned.\n\n**Remarks:**\n\n* To get a boolean value returned use ``array_contains()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.", "categories": [ "arrays" ], @@ -27,11 +27,18 @@ } ], "returns": { - "description": "Returns the index of the first element with the specified value. If no element was found, `-1` is returned.", - "schema": { - "type": "integer", - "minimum": -1 - } + "description": "Returns the index or the label of the first element with the specified value. If no element was found, `null` is returned. Labels take preference over indices.", + "schema": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "null" + } + ] }, "examples": [ { @@ -54,7 +61,7 @@ ], "value": "b" }, - "returns": -1 + "returns": null }, { "arguments": { @@ -65,7 +72,7 @@ ], "value": "2" }, - "returns": -1 + "returns": null }, { "arguments": { @@ -96,7 +103,7 @@ 2 ] }, - "returns": -1 + "returns": null }, { "arguments": { @@ -112,7 +119,7 @@ ], "value": 2 }, - "returns": -1 + "returns": null }, { "arguments": { @@ -128,7 +135,7 @@ "a": "b" } }, - "returns": -1 + "returns": null } ] } \ No newline at end of file diff --git a/reduce_dimension.json b/reduce_dimension.json index d13d99fa..49f6ff3e 100644 --- a/reduce_dimension.json +++ b/reduce_dimension.json @@ -25,10 +25,11 @@ "parameters": [ { "name": "data", - "description": "An array with elements of any type.", + "description": "A labeled array with elements of any type.", "required": true, "schema": { "type": "array", + "subtype": "labeled-array", "items": { "description": "Any data type." } diff --git a/resample_cube_temporal.json b/resample_cube_temporal.json index 67029370..0985acd5 100644 --- a/resample_cube_temporal.json +++ b/resample_cube_temporal.json @@ -34,10 +34,11 @@ "parameters": [ { "name": "data", - "description": "An array with elements of any type.", + "description": "A labeled array with elements of any type.", "required": true, "schema": { "type": "array", + "subtype": "labeled-array", "items": { "description": "Any data type." } diff --git a/tests/.words b/tests/.words index 8ca37111..e17cfa15 100644 --- a/tests/.words +++ b/tests/.words @@ -28,4 +28,5 @@ outputMin outputMax Sentinel-2 Sentinel-2A -Sentinel-2B \ No newline at end of file +Sentinel-2B +labeled \ No newline at end of file diff --git a/tests/processes.test.js b/tests/processes.test.js index 6e29c3de..683490cd 100644 --- a/tests/processes.test.js +++ b/tests/processes.test.js @@ -34,6 +34,7 @@ var subtypes = { 'input-format-options': {type: 'object'}, 'job-id': {type: 'string'}, 'kernel': {type: 'array'}, + 'labeled-array': {type: 'array'}, 'output-format': {type: 'string'}, 'output-format-options': {type: 'object'}, 'process-graph': {type: 'object'}, From 27d26b7ef7335f248c00b0a4044900e4bfa7b5d0 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 21 Jan 2020 14:37:20 +0100 Subject: [PATCH 3/7] Pass labels separately from indices to callbacks. --- array_apply.json | 15 +++++++++++++-- array_filter.json | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/array_apply.json b/array_apply.json index 2152d433..67bbe677 100644 --- a/array_apply.json +++ b/array_apply.json @@ -34,16 +34,27 @@ }, { "name": "index", - "description": "The zero-based index or the label of the current element being processed. Labels take preference over indices.", + "description": "The zero-based index of the current element being processed.", "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "label", + "description": "The label of the current element being processed. Only populated for labeled arrays.", "schema": [ { "type": "number" }, { "type": "string" + }, + { + "type": "null" } - ] + ], + "default": null } ] }, diff --git a/array_filter.json b/array_filter.json index fbaff1be..6d48a557 100644 --- a/array_filter.json +++ b/array_filter.json @@ -35,16 +35,27 @@ }, { "name": "index", - "description": "The zero-based index or the label of the current element being processed. Labels take preference over indices.", + "description": "The zero-based index of the current element being processed.", "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "label", + "description": "The label of the current element being processed. Only populated for labeled arrays.", "schema": [ { "type": "number" }, { "type": "string" + }, + { + "type": "null" } - ] + ], + "default": null } ] }, From 7ca63786f091fec79c4e5445a5f6b657b3d2a811 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 21 Jan 2020 15:13:54 +0100 Subject: [PATCH 4/7] Fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 563010f9..242786b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Processes supporting multiple data types in parameters or return values with `anyOf` are now listing the data types directly as array. `anyOf` is discouraged. - Comparison processes `eq`, `gt`, `gte`, `lt`, `lte`, `neq` and `between` accept all data types as input for the operands. - `add_dimension`: Parameter `value` renamed to `label`. -- `aggregate_polygon`, `aggregate_polygon`, `apply_dimension`, `array_element` and `resample_cube_temporal`: Support labeled arrays. [API#245](https://github.com/Open-EO/openeo-api/issues/245) +- `aggregate_polygon`, `aggregate_temporal`, `apply_dimension`, `array_element` and `resample_cube_temporal`: Support labeled arrays. [API#245](https://github.com/Open-EO/openeo-api/issues/245) - `aggregate_polygon`: The data cube implicitly gets restricted to the bounds of the polygons as if `filter_polygon` would have been used beforehand. [#101](https://github.com/Open-EO/openeo-processes/issues/101) - `aggregate_temporal`: Parameter `labels` is optional. [#19](https://github.com/Open-EO/openeo-processes/issues/19) - `apply_dimension`: Replaced with a completely new definition. [#73](https://github.com/Open-EO/openeo-processes/issues/73) From 6549683bac4ab09cba1a4c4d5da0a49d7e0eebf9 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 24 Jan 2020 16:24:01 +0100 Subject: [PATCH 5/7] Make clear whether label or index is used/returned. I doubt that's the final solution, but at least it is explicit. --- array_element.json | 20 ++++++++++++++++---- array_find.json | 12 ++++++++++-- quantiles.json | 2 +- tests/processes.test.js | 3 ++- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/array_element.json b/array_element.json index bab3941d..0bb97f37 100644 --- a/array_element.json +++ b/array_element.json @@ -1,7 +1,7 @@ { "id": "array_element", "summary": "Get an element from an array", - "description": "Returns the element with the specified index or label from the array.", + "description": "Returns the element with the specified index or label from the array.\n\nEither the parameter `index` or `label` must be specified, otherwise the `ArrayElementParameterMissing` exception is thrown. If both parameters are set the `ArrayElementParameterConflict` exception is thrown.", "categories": [ "arrays" ], @@ -19,7 +19,14 @@ }, { "name": "index", - "description": "The zero-based index or the label of the element to retrieve. Labels take preference over indices.", + "description": "The zero-based index of the element to retrieve.", + "schema": { + "type": "integer" + } + }, + { + "name": "label", + "description": "The label of the element to retrieve.", "schema": [ { "type": "number" @@ -27,8 +34,7 @@ { "type": "string" } - ], - "required": true + ] }, { "name": "return_nodata", @@ -48,6 +54,12 @@ "exceptions": { "ArrayElementNotAvailable": { "message": "The array has no element with the specified index or label." + }, + "ArrayElementParameterMissing": { + "message": "The process 'array_element' requires either the 'index' or 'labels' parameter to be set." + }, + "ArrayElementParameterConflict": { + "message": "The process 'array_element' only allows that either the 'index' or the 'labels' parameter is set." } }, "examples": [ diff --git a/array_find.json b/array_find.json index a6d9fccf..2bf0d333 100644 --- a/array_find.json +++ b/array_find.json @@ -1,7 +1,7 @@ { "id": "array_find", "summary": "Get the index/label for a value in an array", - "description": "Checks whether the array specified for `data` contains the value specified in `value` and returns the zero-based index or the label for the first match. If there's no match, `-1` is returned.\n\n**Remarks:**\n\n* To get a boolean value returned use ``array_contains()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.", + "description": "Checks whether the array specified for `data` contains the value specified in `value` and returns the zero-based index for the first match. If there's no match, `null` is returned. Returns the label instead of the index if `return_label` has been set to `true`.\n\n**Remarks:**\n\n* To get a boolean value returned use ``array_contains()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.", "categories": [ "arrays" ], @@ -24,10 +24,18 @@ "description": "Any data type is allowed." }, "required": true + }, + { + "name": "return_label", + "description": "The process returns the label instead of the index if set to `true`. If no labeled array was given in `data`, the index is still returned.", + "schema": { + "type": "boolean" + }, + "default": false } ], "returns": { - "description": "Returns the index or the label of the first element with the specified value. If no element was found, `null` is returned. Labels take preference over indices.", + "description": "Depending on the parameter `return_label`, returns either the index or the label of the first element with the specified value. If no element was found, `null` is returned.", "schema": [ { "type": "number" diff --git a/quantiles.json b/quantiles.json index 7787c948..9a5a095c 100644 --- a/quantiles.json +++ b/quantiles.json @@ -1,7 +1,7 @@ { "id": "quantiles", "summary": "Quantiles", - "description": "Calculates quantiles, which are cut points dividing the range of a probability distribution into either\n\n* intervals corresponding to the given `probabilities` or\n* (nearly) equal-sized intervals (q-quantiles based on the parameter `q`).\n\nEither the parameter `probabilites` or `q` must be specified, otherwise the `QuantilesParameterMissing` exception must be thrown. If both parameters are set the `QuantilesParameterConflict` exception must be thrown.", + "description": "Calculates quantiles, which are cut points dividing the range of a probability distribution into either\n\n* intervals corresponding to the given `probabilities` or\n* (nearly) equal-sized intervals (q-quantiles based on the parameter `q`).\n\nEither the parameter `probabilites` or `q` must be specified, otherwise the `QuantilesParameterMissing` exception is thrown. If both parameters are set the `QuantilesParameterConflict` exception is thrown.", "categories": [ "math" ], diff --git a/tests/processes.test.js b/tests/processes.test.js index 683490cd..766d07b1 100644 --- a/tests/processes.test.js +++ b/tests/processes.test.js @@ -13,7 +13,8 @@ var summaryDotRegexp = /[^\.]$/; var files = glob.sync("../*.json", {realpath: true}); var anyOfRequired = [ - "quantiles" + "quantiles", + "array_element" ]; var subtypes = { From f0aa9006c5d5193a4888b68ec40ee8506c82d4a8 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 27 Jan 2020 15:02:21 +0100 Subject: [PATCH 6/7] Revert array_find to only return indices and make null value to be used when nothing is found. --- array_find.json | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/array_find.json b/array_find.json index 2bf0d333..e70a8b2e 100644 --- a/array_find.json +++ b/array_find.json @@ -1,7 +1,7 @@ { "id": "array_find", - "summary": "Get the index/label for a value in an array", - "description": "Checks whether the array specified for `data` contains the value specified in `value` and returns the zero-based index for the first match. If there's no match, `null` is returned. Returns the label instead of the index if `return_label` has been set to `true`.\n\n**Remarks:**\n\n* To get a boolean value returned use ``array_contains()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.", + "summary": "Get the index for a value in an array", + "description": "Checks whether the array specified for `data` contains the value specified in `value` and returns the zero-based index for the first match. If there's no match, `null` is returned.\n\n**Remarks:**\n\n* To get a boolean value returned use ``array_contains()``.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. This includes that data types MUST be checked strictly, for example a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating point numbers due to floating point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.", "categories": [ "arrays" ], @@ -24,27 +24,17 @@ "description": "Any data type is allowed." }, "required": true - }, - { - "name": "return_label", - "description": "The process returns the label instead of the index if set to `true`. If no labeled array was given in `data`, the index is still returned.", - "schema": { - "type": "boolean" - }, - "default": false } ], "returns": { - "description": "Depending on the parameter `return_label`, returns either the index or the label of the first element with the specified value. If no element was found, `null` is returned.", + "description": "Returns the index of the first element with the specified value. If no element was found, `null` is returned.", "schema": [ { - "type": "number" - }, - { - "type": "string" + "type": "null" }, { - "type": "null" + "type": "integer", + "minimum": 0 } ] }, From d2a95b0c8ff0f2e91dbd77d85dc77268e3bd6ce2 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 27 Jan 2020 15:28:28 +0100 Subject: [PATCH 7/7] Align to recent API changes --- absolute.json | 3 +-- add.json | 6 ++---- add_dimension.json | 12 +++++------- aggregate_polygon.json | 13 +++++-------- aggregate_polygon_binary.json | 14 +++++--------- aggregate_temporal.json | 16 +++++++--------- all.json | 6 +++--- and.json | 6 ++---- any.json | 6 +++--- apply.json | 7 ++----- apply_dimension.json | 13 +++++-------- apply_kernel.json | 9 ++++----- arccos.json | 3 +-- arcosh.json | 3 +-- arcsin.json | 3 +-- arctan.json | 3 +-- arctan2.json | 6 ++---- array_apply.json | 11 ++++------- array_contains.json | 6 ++---- array_element.json | 12 +++++++----- array_filter.json | 11 ++++------- array_find.json | 6 ++---- array_labels.json | 3 +-- arsinh.json | 3 +-- artanh.json | 3 +-- between.json | 12 +++++------- ceil.json | 3 +-- clip.json | 9 +++------ cos.json | 3 +-- cosh.json | 3 +-- count.json | 7 +++---- cummax.json | 6 +++--- cummin.json | 6 +++--- cumproduct.json | 6 +++--- cumsum.json | 6 +++--- debug.json | 12 +++++++----- dimension_labels.json | 6 ++---- divide.json | 6 ++---- drop_dimension.json | 6 ++---- eq.json | 12 ++++++------ exp.json | 3 +-- extrema.json | 6 +++--- filter_bands.json | 9 +++++---- filter_bbox.json | 4 +--- filter_labels.json | 10 +++------- filter_polygon.json | 6 ++---- filter_temporal.json | 9 ++++----- first.json | 6 +++--- floor.json | 3 +-- gt.json | 6 ++---- gte.json | 6 ++---- if.json | 9 ++++----- int.json | 3 +-- is_nan.json | 3 +-- is_nodata.json | 3 +-- is_valid.json | 3 +-- last.json | 6 +++--- linear_scale_range.json | 15 +++++++-------- ln.json | 3 +-- load_collection.json | 15 +++++++-------- load_result.json | 3 +-- load_uploaded_files.json | 9 ++++----- log.json | 6 ++---- lt.json | 6 ++---- lte.json | 6 ++---- mask.json | 9 ++++----- mask_polygon.json | 12 ++++++------ max.json | 6 +++--- mean.json | 6 +++--- median.json | 6 +++--- merge_cubes.json | 11 ++++------- min.json | 6 +++--- mod.json | 6 ++---- multiply.json | 6 ++---- ndvi.json | 12 +++++++----- neq.json | 12 ++++++------ normalized_difference.json | 6 ++---- not.json | 3 +-- or.json | 6 ++---- order.json | 9 +++++---- power.json | 6 ++---- product.json | 6 +++--- quantiles.json | 12 +++++++----- rearrange.json | 6 ++---- reduce_dimension.json | 10 +++------- reduce_dimension_binary.json | 11 +++-------- rename_dimension.json | 9 +++------ rename_labels.json | 12 +++++------- resample_cube_spatial.json | 9 ++++----- resample_cube_temporal.json | 13 +++++-------- resample_spatial.json | 15 +++++++++------ round.json | 6 +++--- run_process_graph.json | 6 +++--- run_udf.json | 15 +++++++-------- run_udf_externally.json | 9 ++++----- save_result.json | 9 ++++----- sd.json | 6 +++--- sgn.json | 3 +-- sin.json | 3 +-- sinh.json | 3 +-- sort.json | 9 +++++---- sqrt.json | 3 +-- subtract.json | 6 ++---- sum.json | 6 +++--- tan.json | 3 +-- tanh.json | 3 +-- text_begins.json | 9 ++++----- text_contains.json | 9 ++++----- text_ends.json | 9 ++++----- text_merge.json | 6 +++--- trim_cube.json | 3 +-- variance.json | 6 +++--- xor.json | 6 ++---- 113 files changed, 341 insertions(+), 467 deletions(-) diff --git a/absolute.json b/absolute.json index 0e666843..0752de07 100644 --- a/absolute.json +++ b/absolute.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/add.json b/add.json index 1d46f904..66e00fce 100644 --- a/add.json +++ b/add.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "y", @@ -25,8 +24,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/add_dimension.json b/add_dimension.json index 53a6f868..6213bb04 100644 --- a/add_dimension.json +++ b/add_dimension.json @@ -12,16 +12,14 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "name", "description": "Name for the dimension.", "schema": { "type": "string" - }, - "required": true + } }, { "name": "label", @@ -33,8 +31,7 @@ { "type": "string" } - ], - "required": true + ] }, { "name": "type", @@ -48,7 +45,8 @@ "other" ] }, - "default": "other" + "default": "other", + "optional": true } ], "returns": { diff --git a/aggregate_polygon.json b/aggregate_polygon.json index e5b02b32..9e9759a4 100644 --- a/aggregate_polygon.json +++ b/aggregate_polygon.json @@ -13,8 +13,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "polygons", @@ -28,8 +27,7 @@ "type": "object", "subtype": "vector-cube" } - ], - "required": true + ] }, { "name": "reducer", @@ -41,7 +39,6 @@ { "name": "data", "description": "A labeled array with values of any type.", - "required": true, "schema": { "type": "array", "subtype": "labeled-array", @@ -51,8 +48,7 @@ } } ] - }, - "required": true + } }, { "name": "name", @@ -60,7 +56,8 @@ "schema": { "type": "string" }, - "default": "result" + "default": "result", + "optional": true } ], "returns": { diff --git a/aggregate_polygon_binary.json b/aggregate_polygon_binary.json index 20430b4f..55d8eee2 100644 --- a/aggregate_polygon_binary.json +++ b/aggregate_polygon_binary.json @@ -14,8 +14,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "polygons", @@ -29,8 +28,7 @@ "type": "object", "subtype": "vector-cube" } - ], - "required": true + ] }, { "name": "reducer", @@ -42,7 +40,6 @@ { "name": "x", "description": "The first value.", - "required": true, "schema": { "description": "Any data type." } @@ -50,14 +47,12 @@ { "name": "y", "description": "The second value.", - "required": true, "schema": { "description": "Any data type." } } ] - }, - "required": true + } }, { "name": "name", @@ -65,7 +60,8 @@ "schema": { "type": "string" }, - "default": "result" + "default": "result", + "optional": true } ], "returns": { diff --git a/aggregate_temporal.json b/aggregate_temporal.json index 22a7df58..fffe14cf 100644 --- a/aggregate_temporal.json +++ b/aggregate_temporal.json @@ -14,8 +14,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "intervals", @@ -77,8 +76,7 @@ ] ] ] - }, - "required": true + } }, { "name": "reducer", @@ -90,7 +88,6 @@ { "name": "data", "description": "A labeled array with elements of any type.", - "required": true, "schema": { "type": "array", "subtype": "labeled-array", @@ -100,8 +97,7 @@ } } ] - }, - "required": true + } }, { "name": "labels", @@ -119,7 +115,8 @@ ] } }, - "default": [] + "default": [], + "optional": true }, { "name": "dimension", @@ -130,7 +127,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/all.json b/all.json index 43fc4235..cbaab1cd 100644 --- a/all.json +++ b/all.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/and.json b/and.json index 38eada1d..07673c06 100644 --- a/and.json +++ b/and.json @@ -14,8 +14,7 @@ "boolean", "null" ] - }, - "required": true + } }, { "name": "y", @@ -25,8 +24,7 @@ "boolean", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/any.json b/any.json index a31bef6c..71d07e1b 100644 --- a/any.json +++ b/any.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/apply.json b/apply.json index 27153575..971fc1fe 100644 --- a/apply.json +++ b/apply.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "process", @@ -25,14 +24,12 @@ { "name": "x", "description": "The value to process.", - "required": true, "schema": { "description": "Any data type." } } ] - }, - "required": true + } } ], "returns": { diff --git a/apply_dimension.json b/apply_dimension.json index 022a8a2b..665617ea 100644 --- a/apply_dimension.json +++ b/apply_dimension.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "process", @@ -25,7 +24,6 @@ { "name": "data", "description": "A labeled array with elements of any type.", - "required": true, "schema": { "type": "array", "subtype": "labeled-array", @@ -35,16 +33,14 @@ } } ] - }, - "required": true + } }, { "name": "dimension", "description": "The name of the source dimension to apply the process on. Fails with a `DimensionNotAvailable` error if the specified dimension does not exist.", "schema": { "type": "string" - }, - "required": true + } }, { "name": "target_dimension", @@ -55,7 +51,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/apply_kernel.json b/apply_kernel.json index 218ec9e9..058bd19d 100644 --- a/apply_kernel.json +++ b/apply_kernel.json @@ -13,8 +13,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "kernel", @@ -29,8 +28,7 @@ "type": "number" } } - }, - "required": true + } }, { "name": "factor", @@ -38,7 +36,8 @@ "schema": { "type": "number" }, - "default": 1 + "default": 1, + "optional": true } ], "returns": { diff --git a/arccos.json b/arccos.json index a290740b..a3418b6a 100644 --- a/arccos.json +++ b/arccos.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/arcosh.json b/arcosh.json index 60f00002..413dcefe 100644 --- a/arcosh.json +++ b/arcosh.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/arcsin.json b/arcsin.json index e653335f..e9548e57 100644 --- a/arcsin.json +++ b/arcsin.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/arctan.json b/arctan.json index d8848ba3..88f563b4 100644 --- a/arctan.json +++ b/arctan.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/arctan2.json b/arctan2.json index 23b77020..a4d91b2a 100644 --- a/arctan2.json +++ b/arctan2.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "x", @@ -25,8 +24,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/array_apply.json b/array_apply.json index 67bbe677..a4e51836 100644 --- a/array_apply.json +++ b/array_apply.json @@ -14,8 +14,7 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "process", @@ -27,7 +26,6 @@ { "name": "x", "description": "The value of the current element being processed.", - "required": true, "schema": { "description": "Any data type." } @@ -35,7 +33,6 @@ { "name": "index", "description": "The zero-based index of the current element being processed.", - "required": true, "schema": { "type": "integer" } @@ -54,11 +51,11 @@ "type": "null" } ], - "default": null + "default": null, + "optional": true } ] - }, - "required": true + } } ], "returns": { diff --git a/array_contains.json b/array_contains.json index 13b89377..62c6c197 100644 --- a/array_contains.json +++ b/array_contains.json @@ -15,16 +15,14 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "value", "description": "Value to find in `data`.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/array_element.json b/array_element.json index 0bb97f37..6e6cb1f2 100644 --- a/array_element.json +++ b/array_element.json @@ -14,15 +14,15 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "index", "description": "The zero-based index of the element to retrieve.", "schema": { "type": "integer" - } + }, + "optional": true }, { "name": "label", @@ -34,7 +34,8 @@ { "type": "string" } - ] + ], + "optional": true }, { "name": "return_nodata", @@ -42,7 +43,8 @@ "schema": { "type": "boolean" }, - "default": false + "default": false, + "optional": true } ], "returns": { diff --git a/array_filter.json b/array_filter.json index 6d48a557..8b9bd8bd 100644 --- a/array_filter.json +++ b/array_filter.json @@ -15,8 +15,7 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "condition", @@ -28,7 +27,6 @@ { "name": "x", "description": "The value of the current element being processed.", - "required": true, "schema": { "description": "Any data type." } @@ -36,7 +34,6 @@ { "name": "index", "description": "The zero-based index of the current element being processed.", - "required": true, "schema": { "type": "integer" } @@ -55,11 +52,11 @@ "type": "null" } ], - "default": null + "default": null, + "optional": true } ] - }, - "required": true + } } ], "returns": { diff --git a/array_find.json b/array_find.json index e70a8b2e..7f394dd0 100644 --- a/array_find.json +++ b/array_find.json @@ -14,16 +14,14 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "value", "description": "Value to find in `data`.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/array_labels.json b/array_labels.json index 3e3136a4..2e26c62b 100644 --- a/array_labels.json +++ b/array_labels.json @@ -12,8 +12,7 @@ "schema": { "type": "array", "subtype": "labeled-array" - }, - "required": true + } } ], "returns": { diff --git a/arsinh.json b/arsinh.json index 1a64459c..46c936aa 100644 --- a/arsinh.json +++ b/arsinh.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/artanh.json b/artanh.json index fd5786a3..18a30726 100644 --- a/artanh.json +++ b/artanh.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/between.json b/between.json index d9176976..33980ae4 100644 --- a/between.json +++ b/between.json @@ -11,8 +11,7 @@ "description": "The value to check.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "min", @@ -36,8 +35,7 @@ "format": "time", "subtype": "time" } - ], - "required": true + ] }, { "name": "max", @@ -61,8 +59,7 @@ "format": "time", "subtype": "time" } - ], - "required": true + ] }, { "name": "exclude_max", @@ -70,7 +67,8 @@ "schema": { "type": "boolean" }, - "default": false + "default": false, + "optional": true } ], "returns": { diff --git a/ceil.json b/ceil.json index dee9dbdc..7c01cf45 100644 --- a/ceil.json +++ b/ceil.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/clip.json b/clip.json index 710ad031..753bd1fe 100644 --- a/clip.json +++ b/clip.json @@ -14,24 +14,21 @@ "number", "null" ] - }, - "required": true + } }, { "name": "min", "description": "Minimum value. If the value is lower than this value, the process will return the value of this parameter.", "schema": { "type": "number" - }, - "required": true + } }, { "name": "max", "description": "Maximum value. If the value is greater than this value, the process will return the value of this parameter.", "schema": { "type": "number" - }, - "required": true + } } ], "returns": { diff --git a/cos.json b/cos.json index f7120770..6e6e4143 100644 --- a/cos.json +++ b/cos.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/cosh.json b/cosh.json index d452aad0..975958a4 100644 --- a/cosh.json +++ b/cosh.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/count.json b/count.json index acd8c961..6217f0f2 100644 --- a/count.json +++ b/count.json @@ -15,8 +15,7 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "condition", @@ -31,7 +30,6 @@ { "name": "x", "description": "The value of the current element being processed.", - "required": true, "schema": { "description": "Any data type." } @@ -50,7 +48,8 @@ "type": "null" } ], - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/cummax.json b/cummax.json index 63e64600..18a37abd 100644 --- a/cummax.json +++ b/cummax.json @@ -17,8 +17,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -26,7 +25,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/cummin.json b/cummin.json index a75f1231..fd20a92b 100644 --- a/cummin.json +++ b/cummin.json @@ -17,8 +17,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -26,7 +25,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/cumproduct.json b/cumproduct.json index 9ec56f4b..cf135e2f 100644 --- a/cumproduct.json +++ b/cumproduct.json @@ -17,8 +17,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -26,7 +25,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/cumsum.json b/cumsum.json index 493cecea..6ce6b10c 100644 --- a/cumsum.json +++ b/cumsum.json @@ -17,8 +17,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -26,7 +25,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/debug.json b/debug.json index b319db47..a6726a0c 100644 --- a/debug.json +++ b/debug.json @@ -11,8 +11,7 @@ "description": "Data to publish.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "code", @@ -20,7 +19,8 @@ "schema": { "type": "string" }, - "default": "" + "default": "", + "optional": true }, { "name": "level", @@ -34,7 +34,8 @@ "debug" ] }, - "default": "info" + "default": "info", + "optional": true }, { "name": "message", @@ -42,7 +43,8 @@ "schema": { "type": "string" }, - "default": "" + "default": "", + "optional": true } ], "returns": { diff --git a/dimension_labels.json b/dimension_labels.json index 504b62d5..6e3bc205 100644 --- a/dimension_labels.json +++ b/dimension_labels.json @@ -12,16 +12,14 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "dimension", "description": "The name of the dimension to get the labels for.", "schema": { "type": "string" - }, - "required": true + } } ], "returns": { diff --git a/divide.json b/divide.json index 837f81cf..d5cc39ac 100644 --- a/divide.json +++ b/divide.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "y", @@ -25,8 +24,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/drop_dimension.json b/drop_dimension.json index ebf15ca9..0a39e35d 100644 --- a/drop_dimension.json +++ b/drop_dimension.json @@ -12,16 +12,14 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "name", "description": "Name of the dimension to drop.", "schema": { "type": "string" - }, - "required": true + } } ], "returns": { diff --git a/eq.json b/eq.json index 65d74def..6ca37a8f 100644 --- a/eq.json +++ b/eq.json @@ -12,16 +12,14 @@ "description": "First operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "y", "description": "Second operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "delta", @@ -32,7 +30,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true }, { "name": "case_sensitive", @@ -40,7 +39,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/exp.json b/exp.json index cd0d0ec9..fe983468 100644 --- a/exp.json +++ b/exp.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/extrema.json b/extrema.json index 169b4675..d4a4c0d2 100644 --- a/extrema.json +++ b/extrema.json @@ -17,8 +17,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -26,7 +25,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/filter_bands.json b/filter_bands.json index 8d32fc1e..e8b244a1 100644 --- a/filter_bands.json +++ b/filter_bands.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "bands", @@ -25,7 +24,8 @@ "subtype": "band-name" } }, - "default": [] + "default": [], + "optional": true }, { "name": "wavelengths", @@ -53,7 +53,8 @@ ] } }, - "default": [] + "default": [], + "optional": true } ], "returns": { diff --git a/filter_bbox.json b/filter_bbox.json index 7e5a02cb..d0bbb01a 100644 --- a/filter_bbox.json +++ b/filter_bbox.json @@ -12,13 +12,11 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "extent", "description": "A bounding box, which may include a vertical axis (see `base` and `height`).", - "required": true, "schema": { "type": "object", "subtype": "bounding-box", diff --git a/filter_labels.json b/filter_labels.json index e8b9a6b9..ef707195 100644 --- a/filter_labels.json +++ b/filter_labels.json @@ -13,8 +13,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "condition", @@ -26,7 +25,6 @@ { "name": "value", "description": "A single dimension label to compare against. The data type of the parameter depends on the dimension labels stored for the dimension.", - "required": true, "schema": [ { "type": "number" @@ -37,16 +35,14 @@ ] } ] - }, - "required": true + } }, { "name": "dimension", "description": "The name of the dimension to filter on. Fails with a `DimensionNotAvailable` error if the specified dimension does not exist.\n\n**Remarks:**\n\n* The default dimensions a data cube provides are described in the collection's metadata field `cube:dimensions`.\n* There could be multiple spatial dimensions such as `x`, `y` or `z`.\n* For multi-spectral imagery there is usually a separate dimension of type `bands` for the bands.", "schema": { "type": "string" - }, - "required": true + } } ], "returns": { diff --git a/filter_polygon.json b/filter_polygon.json index f1f56d03..f2ae6ac9 100644 --- a/filter_polygon.json +++ b/filter_polygon.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "polygons", @@ -21,8 +20,7 @@ "schema": { "type": "object", "subtype": "geojson" - }, - "required": true + } } ], "returns": { diff --git a/filter_temporal.json b/filter_temporal.json index 2d5eb9ee..286b8901 100644 --- a/filter_temporal.json +++ b/filter_temporal.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "extent", @@ -50,8 +49,7 @@ "2016-01-01" ] ] - }, - "required": true + } }, { "name": "dimension", @@ -62,7 +60,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/first.json b/first.json index 4e10c2ff..4f48544d 100644 --- a/first.json +++ b/first.json @@ -15,8 +15,7 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -24,7 +23,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/floor.json b/floor.json index 195ec3d2..aab1aba6 100644 --- a/floor.json +++ b/floor.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/gt.json b/gt.json index e8181fd6..4ae5ecd0 100644 --- a/gt.json +++ b/gt.json @@ -11,16 +11,14 @@ "description": "First operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "y", "description": "Second operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/gte.json b/gte.json index d4bc801b..3ce79bb3 100644 --- a/gte.json +++ b/gte.json @@ -11,16 +11,14 @@ "description": "First operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "y", "description": "Second operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/if.json b/if.json index 1a6a3b3e..43e6fcdc 100644 --- a/if.json +++ b/if.json @@ -16,16 +16,14 @@ "boolean", "null" ] - }, - "required": true + } }, { "name": "accept", "description": "A value that is returned if the boolean value is `true`.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "reject", @@ -33,7 +31,8 @@ "schema": { "description": "Any data type is allowed." }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/int.json b/int.json index f5186d66..ba392380 100644 --- a/int.json +++ b/int.json @@ -15,8 +15,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/is_nan.json b/is_nan.json index d6c67874..60ccea25 100644 --- a/is_nan.json +++ b/is_nan.json @@ -11,8 +11,7 @@ "description": "The data to check.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/is_nodata.json b/is_nodata.json index d1c90caf..f2ab4d5e 100644 --- a/is_nodata.json +++ b/is_nodata.json @@ -11,8 +11,7 @@ "description": "The data to check.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/is_valid.json b/is_valid.json index 59442db7..fe5e984f 100644 --- a/is_valid.json +++ b/is_valid.json @@ -11,8 +11,7 @@ "description": "The data to check.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/last.json b/last.json index 85572c8e..cfc3875a 100644 --- a/last.json +++ b/last.json @@ -15,8 +15,7 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -24,7 +23,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/linear_scale_range.json b/linear_scale_range.json index e41178e2..907c28a8 100644 --- a/linear_scale_range.json +++ b/linear_scale_range.json @@ -14,24 +14,21 @@ "number", "null" ] - }, - "required": true + } }, { "name": "inputMin", "description": "Minimum value the input can obtain.", "schema": { "type": "number" - }, - "required": true + } }, { "name": "inputMax", "description": "Maximum value the input can obtain.", "schema": { "type": "number" - }, - "required": true + } }, { "name": "outputMin", @@ -39,7 +36,8 @@ "schema": { "type": "number" }, - "default": 0 + "default": 0, + "optional": true }, { "name": "outputMax", @@ -47,7 +45,8 @@ "schema": { "type": "number" }, - "default": 1 + "default": 1, + "optional": true } ], "returns": { diff --git a/ln.json b/ln.json index 0a3fb9bf..d0cfe8a5 100644 --- a/ln.json +++ b/ln.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/load_collection.json b/load_collection.json index 2ba5522e..e3dc43f5 100644 --- a/load_collection.json +++ b/load_collection.json @@ -14,8 +14,7 @@ "type": "string", "subtype": "collection-id", "pattern": "^[A-Za-z0-9_\\-\\.~/]+$" - }, - "required": true + } }, { "name": "spatial_extent", @@ -101,8 +100,7 @@ "description": "Don't filter spatially. All data is included in the data cube.", "type": "null" } - ], - "required": true + ] }, { "name": "temporal_extent", @@ -146,8 +144,7 @@ "description": "Don't filter temporally. All data is included in the data cube.", "type": "null" } - ], - "required": true + ] }, { "name": "bands", @@ -166,7 +163,8 @@ "type": "null" } ], - "default": null + "default": null, + "optional": true }, { "name": "properties", @@ -195,7 +193,8 @@ "type": "null" } ], - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/load_result.json b/load_result.json index 4c1d3390..6a7b5c45 100644 --- a/load_result.json +++ b/load_result.json @@ -14,8 +14,7 @@ "type": "string", "subtype": "job-id", "pattern": "^[A-Za-z0-9_\\-\\.~]+$" - }, - "required": true + } } ], "returns": { diff --git a/load_uploaded_files.json b/load_uploaded_files.json index f89d8627..e77098b2 100644 --- a/load_uploaded_files.json +++ b/load_uploaded_files.json @@ -17,8 +17,7 @@ "type": "string", "subtype": "file-path" } - }, - "required": true + } }, { "name": "format", @@ -26,8 +25,7 @@ "schema": { "type": "string", "subtype": "input-format" - }, - "required": true + } }, { "name": "options", @@ -36,7 +34,8 @@ "type": "object", "subtype": "input-format-options" }, - "default": {} + "default": {}, + "optional": true } ], "returns": { diff --git a/log.json b/log.json index d9ccb0da..e964961d 100644 --- a/log.json +++ b/log.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "base", @@ -25,8 +24,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/lt.json b/lt.json index 0e843aef..54e7b749 100644 --- a/lt.json +++ b/lt.json @@ -11,16 +11,14 @@ "description": "First operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "y", "description": "Second operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/lte.json b/lte.json index e3e70f8a..b9ba86a8 100644 --- a/lte.json +++ b/lte.json @@ -11,16 +11,14 @@ "description": "First operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "y", "description": "Second operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } } ], "returns": { diff --git a/mask.json b/mask.json index ca860d0d..f21138f4 100644 --- a/mask.json +++ b/mask.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "mask", @@ -21,8 +20,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "replacement", @@ -35,7 +33,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/mask_polygon.json b/mask_polygon.json index 11d95f5f..fe1bea9e 100644 --- a/mask_polygon.json +++ b/mask_polygon.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "mask", @@ -21,8 +20,7 @@ "schema": { "type": "object", "subtype": "geojson" - }, - "required": true + } }, { "name": "replacement", @@ -35,7 +33,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true }, { "name": "inside", @@ -43,7 +42,8 @@ "schema": { "type": "boolean" }, - "default": false + "default": false, + "optional": true } ], "returns": { diff --git a/max.json b/max.json index b771d0b7..139f58d6 100644 --- a/max.json +++ b/max.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/mean.json b/mean.json index 70922216..24919f04 100644 --- a/mean.json +++ b/mean.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/median.json b/median.json index b324d43a..7543bd9a 100644 --- a/median.json +++ b/median.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/merge_cubes.json b/merge_cubes.json index b04f6700..a31d6c49 100644 --- a/merge_cubes.json +++ b/merge_cubes.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "cube2", @@ -21,8 +20,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "overlap_resolver", @@ -34,7 +32,6 @@ { "name": "x", "description": "The first value.", - "required": true, "schema": { "description": "Any data type." } @@ -42,14 +39,14 @@ { "name": "y", "description": "The second value.", - "required": true, "schema": { "description": "Any data type." } } ] }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/min.json b/min.json index 92271a33..38dc7b30 100644 --- a/min.json +++ b/min.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/mod.json b/mod.json index 492fe9e8..c9ed9ce1 100644 --- a/mod.json +++ b/mod.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "y", @@ -25,8 +24,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/multiply.json b/multiply.json index aaccbead..e0c901c7 100644 --- a/multiply.json +++ b/multiply.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "y", @@ -25,8 +24,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/ndvi.json b/ndvi.json index d3f7d602..cb14d597 100644 --- a/ndvi.json +++ b/ndvi.json @@ -13,8 +13,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "nir", @@ -23,7 +22,8 @@ "type": "string", "subtype": "band-name" }, - "default": "nir" + "default": "nir", + "optional": true }, { "name": "red", @@ -32,7 +32,8 @@ "type": "string", "subtype": "band-name" }, - "default": "red" + "default": "red", + "optional": true }, { "name": "target_band", @@ -46,7 +47,8 @@ "type": "null" } ], - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/neq.json b/neq.json index 49d31e7e..5b51bfe5 100644 --- a/neq.json +++ b/neq.json @@ -12,16 +12,14 @@ "description": "First operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "y", "description": "Second operand.", "schema": { "description": "Any data type is allowed." - }, - "required": true + } }, { "name": "delta", @@ -32,7 +30,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true }, { "name": "case_sensitive", @@ -40,7 +39,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/normalized_difference.json b/normalized_difference.json index 902121be..d11a78da 100644 --- a/normalized_difference.json +++ b/normalized_difference.json @@ -12,16 +12,14 @@ "description": "The value for the first band.", "schema": { "type": "number" - }, - "required": true + } }, { "name": "y", "description": "The value for the second band.", "schema": { "type": "number" - }, - "required": true + } } ], "returns": { diff --git a/not.json b/not.json index e6b7eda2..58e91daf 100644 --- a/not.json +++ b/not.json @@ -14,8 +14,7 @@ "boolean", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/or.json b/or.json index 6c1c5568..ef6ef47f 100644 --- a/or.json +++ b/or.json @@ -14,8 +14,7 @@ "boolean", "null" ] - }, - "required": true + } }, { "name": "y", @@ -25,8 +24,7 @@ "boolean", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/order.json b/order.json index 4727407d..72976dd1 100644 --- a/order.json +++ b/order.json @@ -37,8 +37,7 @@ } ] } - }, - "required": true + } }, { "name": "asc", @@ -46,7 +45,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true }, { "name": "nodata", @@ -57,7 +57,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/power.json b/power.json index 63ab72f2..d01912a0 100644 --- a/power.json +++ b/power.json @@ -15,8 +15,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "p", @@ -26,8 +25,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/product.json b/product.json index b77df584..6bb8428d 100644 --- a/product.json +++ b/product.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/quantiles.json b/quantiles.json index 9a5a095c..91b8756d 100644 --- a/quantiles.json +++ b/quantiles.json @@ -17,8 +17,7 @@ "null" ] } - }, - "required": true + } }, { "name": "probabilities", @@ -30,7 +29,8 @@ "minimum": 0, "maximum": 1 } - } + }, + "optional": true }, { "name": "q", @@ -38,7 +38,8 @@ "schema": { "type": "integer", "minimum": 2 - } + }, + "optional": true }, { "name": "ignore_nodata", @@ -46,7 +47,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/rearrange.json b/rearrange.json index 14bc662c..92bdf6db 100644 --- a/rearrange.json +++ b/rearrange.json @@ -15,8 +15,7 @@ "items": { "description": "Any data type is allowed." } - }, - "required": true + } }, { "name": "order", @@ -27,8 +26,7 @@ "type": "integer", "minimum": 0 } - }, - "required": true + } } ], "returns": { diff --git a/reduce_dimension.json b/reduce_dimension.json index 49f6ff3e..e4869962 100644 --- a/reduce_dimension.json +++ b/reduce_dimension.json @@ -13,8 +13,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "reducer", @@ -26,7 +25,6 @@ { "name": "data", "description": "A labeled array with elements of any type.", - "required": true, "schema": { "type": "array", "subtype": "labeled-array", @@ -36,16 +34,14 @@ } } ] - }, - "required": true + } }, { "name": "dimension", "description": "The name of the dimension over which to reduce. Fails with a `DimensionNotAvailable` error if the specified dimension does not exist.\n\n**Remarks:**\n\n* The default dimensions a data cube provides are described in the collection's metadata field `cube:dimensions`.\n* There could be multiple spatial dimensions such as `x`, `y` or `z`.\n* For multi-spectral imagery there is usually a separate dimension of type `bands` for the bands.", "schema": { "type": "string" - }, - "required": true + } } ], "returns": { diff --git a/reduce_dimension_binary.json b/reduce_dimension_binary.json index cdd5ae80..b13f4085 100644 --- a/reduce_dimension_binary.json +++ b/reduce_dimension_binary.json @@ -14,8 +14,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "reducer", @@ -27,7 +26,6 @@ { "name": "x", "description": "The first value.", - "required": true, "schema": { "description": "Any data type." } @@ -35,22 +33,19 @@ { "name": "y", "description": "The second value.", - "required": true, "schema": { "description": "Any data type." } } ] - }, - "required": true + } }, { "name": "dimension", "description": "The name of the dimension over which to reduce. Fails with a `DimensionNotAvailable` error if the specified dimension does not exist.\n\n**Remarks:**\n\n* The default dimensions a data cube provides are described in the collection's metadata field `cube:dimensions`.\n* There could be multiple spatial dimensions such as `x`, `y` or `z`.\n* For multi-spectral imagery there is usually a separate dimension of type `bands` for the bands.", "schema": { "type": "string" - }, - "required": true + } } ], "returns": { diff --git a/rename_dimension.json b/rename_dimension.json index 972f3abc..93063243 100644 --- a/rename_dimension.json +++ b/rename_dimension.json @@ -12,24 +12,21 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "source", "description": "The current name of the dimension. Fails with a `DimensionNotAvailable` error if the specified dimension does not exist.", "schema": { "type": "string" - }, - "required": true + } }, { "name": "target", "description": "A new Name for the dimension. Fails with a `DimensionExists` error if a dimension with the specified name exists.", "schema": { "type": "string" - }, - "required": true + } } ], "returns": { diff --git a/rename_labels.json b/rename_labels.json index 064b0e70..b72189bd 100644 --- a/rename_labels.json +++ b/rename_labels.json @@ -12,16 +12,14 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "dimension", "description": "The name of the dimension to rename the labels for.", "schema": { "type": "string" - }, - "required": true + } }, { "name": "target", @@ -38,8 +36,7 @@ } ] } - }, - "required": true + } }, { "name": "source", @@ -57,7 +54,8 @@ ] } }, - "default": [] + "default": [], + "optional": true } ], "returns": { diff --git a/resample_cube_spatial.json b/resample_cube_spatial.json index 933de71b..34e0a4c4 100644 --- a/resample_cube_spatial.json +++ b/resample_cube_spatial.json @@ -13,8 +13,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "target", @@ -22,8 +21,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "method", @@ -45,7 +43,8 @@ "q3" ] }, - "default": "near" + "default": "near", + "optional": true } ], "returns": { diff --git a/resample_cube_temporal.json b/resample_cube_temporal.json index 0985acd5..2bee156e 100644 --- a/resample_cube_temporal.json +++ b/resample_cube_temporal.json @@ -13,8 +13,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "target", @@ -22,8 +21,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "method", @@ -35,7 +33,6 @@ { "name": "data", "description": "A labeled array with elements of any type.", - "required": true, "schema": { "type": "array", "subtype": "labeled-array", @@ -45,8 +42,7 @@ } } ] - }, - "required": true + } }, { "name": "dimension", @@ -57,7 +53,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/resample_spatial.json b/resample_spatial.json index 167b209d..e6a074c5 100644 --- a/resample_spatial.json +++ b/resample_spatial.json @@ -13,8 +13,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } }, { "name": "resolution", @@ -36,7 +35,8 @@ } } ], - "default": 0 + "default": 0, + "optional": true }, { "name": "projection", @@ -66,7 +66,8 @@ "type": "null" } ], - "default": null + "default": null, + "optional": true }, { "name": "method", @@ -88,7 +89,8 @@ "q3" ] }, - "default": "near" + "default": "near", + "optional": true }, { "name": "align", @@ -102,7 +104,8 @@ "upper-right" ] }, - "default": "upper-left" + "default": "upper-left", + "optional": true } ], "returns": { diff --git a/round.json b/round.json index bab23bd1..b6ae30e6 100644 --- a/round.json +++ b/round.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "p", @@ -23,7 +22,8 @@ "schema": { "type": "integer" }, - "default": 0 + "default": 0, + "optional": true } ], "returns": { diff --git a/run_process_graph.json b/run_process_graph.json index 0ed7b9c7..06b42e50 100644 --- a/run_process_graph.json +++ b/run_process_graph.json @@ -23,8 +23,7 @@ "subtype": "process-graph-id", "pattern": "^[A-Za-z0-9_\\-\\.~]+$" } - ], - "required": true + ] }, { "name": "variables", @@ -33,7 +32,8 @@ "type": "object", "subtype": "process-graph-variables" }, - "default": {} + "default": {}, + "optional": true } ], "returns": { diff --git a/run_udf.json b/run_udf.json index 0e5edd6f..bc8a58b1 100644 --- a/run_udf.json +++ b/run_udf.json @@ -28,8 +28,7 @@ "title": "Single Value", "description": "A single value of any data type." } - ], - "required": true + ] }, { "name": "udf", @@ -51,8 +50,7 @@ "type": "string", "subtype": "udf-code" } - ], - "required": true + ] }, { "name": "runtime", @@ -60,8 +58,7 @@ "schema": { "type": "string", "subtype": "udf-runtime" - }, - "required": true + } }, { "name": "version", @@ -76,7 +73,8 @@ "type": "null" } ], - "default": null + "default": null, + "optional": true }, { "name": "context", @@ -84,7 +82,8 @@ "schema": { "type": "object" }, - "default": {} + "default": {}, + "optional": true } ], "exceptions": { diff --git a/run_udf_externally.json b/run_udf_externally.json index 068e51f5..ac65a7c1 100644 --- a/run_udf_externally.json +++ b/run_udf_externally.json @@ -29,8 +29,7 @@ "title": "Single Value", "description": "A single value of any data type." } - ], - "required": true + ] }, { "name": "url", @@ -39,8 +38,7 @@ "type": "string", "format": "uri", "subtype": "uri" - }, - "required": true + } }, { "name": "context", @@ -48,7 +46,8 @@ "schema": { "type": "object" }, - "default": {} + "default": {}, + "optional": true } ], "returns": { diff --git a/save_result.json b/save_result.json index 49d381f9..65aeb832 100644 --- a/save_result.json +++ b/save_result.json @@ -19,8 +19,7 @@ "type": "object", "subtype": "vector-cube" } - ], - "required": true + ] }, { "name": "format", @@ -28,8 +27,7 @@ "schema": { "type": "string", "subtype": "output-format" - }, - "required": true + } }, { "name": "options", @@ -38,7 +36,8 @@ "type": "object", "subtype": "output-format-options" }, - "default": {} + "default": {}, + "optional": true } ], "returns": { diff --git a/sd.json b/sd.json index 32936d1e..542115bc 100644 --- a/sd.json +++ b/sd.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/sgn.json b/sgn.json index 2f591f38..ced856ae 100644 --- a/sgn.json +++ b/sgn.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/sin.json b/sin.json index 439219de..06c45cc4 100644 --- a/sin.json +++ b/sin.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/sinh.json b/sinh.json index 31c148d1..c505b3a3 100644 --- a/sinh.json +++ b/sinh.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/sort.json b/sort.json index c77d9fe9..c141db0a 100644 --- a/sort.json +++ b/sort.json @@ -37,8 +37,7 @@ } ] } - }, - "required": true + } }, { "name": "asc", @@ -46,7 +45,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true }, { "name": "nodata", @@ -57,7 +57,8 @@ "null" ] }, - "default": null + "default": null, + "optional": true } ], "returns": { diff --git a/sqrt.json b/sqrt.json index 571145df..2d025ba9 100644 --- a/sqrt.json +++ b/sqrt.json @@ -15,8 +15,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/subtract.json b/subtract.json index 614a2349..5f8f8d0c 100644 --- a/subtract.json +++ b/subtract.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } }, { "name": "y", @@ -25,8 +24,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/sum.json b/sum.json index 46e3421d..17af5bfe 100644 --- a/sum.json +++ b/sum.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/tan.json b/tan.json index afd5f020..c3952efa 100644 --- a/tan.json +++ b/tan.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/tanh.json b/tanh.json index 7a3ab08b..203f581e 100644 --- a/tanh.json +++ b/tanh.json @@ -14,8 +14,7 @@ "number", "null" ] - }, - "required": true + } } ], "returns": { diff --git a/text_begins.json b/text_begins.json index 60bb3054..36dc8c8b 100644 --- a/text_begins.json +++ b/text_begins.json @@ -15,16 +15,14 @@ "string", "null" ] - }, - "required": true + } }, { "name": "pattern", "description": "Text to find at the beginning of `data`. Regular expressions are not supported.", "schema": { "type": "string" - }, - "required": true + } }, { "name": "case_sensitive", @@ -32,7 +30,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/text_contains.json b/text_contains.json index 19919d5c..af08b231 100644 --- a/text_contains.json +++ b/text_contains.json @@ -15,16 +15,14 @@ "string", "null" ] - }, - "required": true + } }, { "name": "pattern", "description": "Text to find in `data`. Regular expressions are not supported.", "schema": { "type": "string" - }, - "required": true + } }, { "name": "case_sensitive", @@ -32,7 +30,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/text_ends.json b/text_ends.json index 27eee763..03d32a17 100644 --- a/text_ends.json +++ b/text_ends.json @@ -15,16 +15,14 @@ "string", "null" ] - }, - "required": true + } }, { "name": "pattern", "description": "Text to find at the end of `data`. Regular expressions are not supported.", "schema": { "type": "string" - }, - "required": true + } }, { "name": "case_sensitive", @@ -32,7 +30,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/text_merge.json b/text_merge.json index 1a6e96bb..e65f49c7 100644 --- a/text_merge.json +++ b/text_merge.json @@ -19,8 +19,7 @@ "null" ] } - }, - "required": true + } }, { "name": "separator", @@ -33,7 +32,8 @@ "null" ] }, - "default": "" + "default": "", + "optional": true } ], "returns": { diff --git a/trim_cube.json b/trim_cube.json index fceebe42..03d9a5a5 100644 --- a/trim_cube.json +++ b/trim_cube.json @@ -12,8 +12,7 @@ "schema": { "type": "object", "subtype": "raster-cube" - }, - "required": true + } } ], "returns": { diff --git a/variance.json b/variance.json index 0e305d83..e9de83a3 100644 --- a/variance.json +++ b/variance.json @@ -18,8 +18,7 @@ "null" ] } - }, - "required": true + } }, { "name": "ignore_nodata", @@ -27,7 +26,8 @@ "schema": { "type": "boolean" }, - "default": true + "default": true, + "optional": true } ], "returns": { diff --git a/xor.json b/xor.json index 9489c8d8..3a7bbd29 100644 --- a/xor.json +++ b/xor.json @@ -14,8 +14,7 @@ "boolean", "null" ] - }, - "required": true + } }, { "name": "y", @@ -25,8 +24,7 @@ "boolean", "null" ] - }, - "required": true + } } ], "returns": {