From 8a112b7fa44056abbc30f484634d63a519e23352 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 17 Nov 2022 12:42:01 +0100 Subject: [PATCH] Update collection summaries to 1.0.0 #469 --- CHANGELOG.md | 2 +- openapi.yaml | 59 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c5eaa8c..83c1da04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Updated STAC specification examples and references to v1.0.0. +- Updated STAC specification examples and references to v1.0.0, please see the [STAC changelog](https://github.com/radiantearth/stac-spec/blob/master/CHANGELOG.md) for all changes between 0.9 and 1.0. - `cube:dimensions`: `reference_system` is allowed to be PROJJSON, too. - Relaxed requirement that unsupported endpoints must return HTTP status code 501. Instead also HTTP status code 404 can be used (and is regularly used in practice). [#415](https://github.com/Open-EO/openeo-api/issues/415) - Minimum value for `costs` and `budget` is 0. diff --git a/openapi.yaml b/openapi.yaml index 1847ef3a..bc10ad7e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4452,9 +4452,9 @@ components: SAR, Satellite or Scientific) or even custom extensions. Summaries are either a unique set of all available - values *or* statistics. Statistics by default only - specify the range (minimum and maximum values), but - can optionally be accompanied by additional + values, statistics *or* a JSON Schema. Statistics only + specify the range (minimum and maximum values) by default, + but can optionally be accompanied by additional statistical values. The range can specify the potential range of values, but it is recommended to be as precise as possible. The set of values MUST contain @@ -4482,6 +4482,7 @@ components: items: description: A value of any type. - $ref: '#/components/schemas/collection_summary_stats' + - $ref: '#/components/schemas/json_schema' assets: description: |- Dictionary of asset objects for data that can be downloaded, @@ -4640,7 +4641,7 @@ components: - metadata collection_summary_stats: type: object - title: Statistics + title: Statistics / Range description: >- By default, only ranges with a minimum and a maximum value can be specified. Ranges can be @@ -4652,14 +4653,16 @@ components: to add other derived statistical values to the object, for example `mean` or `stddev`. required: - - min - - max + - minimum + - maximum properties: - min: + minimum: + description: The minimum value (inclusive). anyOf: - type: string - type: number - max: + maximum: + description: The maximum value (inclusive). anyOf: - type: string - type: number @@ -5703,7 +5706,7 @@ components: the same level. For example, if type is string, then default can be "foo" but cannot be 1. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.2). allOf: - - $ref: '#/components/schemas/json_schema' + - $ref: '#/components/schemas/process_json_schema' error: title: General Error description: >- @@ -5802,14 +5805,14 @@ components: title: Data Types description: Either a single data type or a list of data types. oneOf: - - $ref: '#/components/schemas/json_schema' + - $ref: '#/components/schemas/process_json_schema' - title: Multiple data types description: A list of data types this parameter supports, specified as JSON Schemas. type: array minItems: 1 uniqueItems: true items: - $ref: '#/components/schemas/json_schema' + $ref: '#/components/schemas/process_json_schema' parameter_schema: title: Parameter Data Types description: Either a single data type or a list of data types. @@ -5848,10 +5851,10 @@ components: schema: $ref: '#/components/schemas/data_type_schema' allOf: - - $ref: '#/components/schemas/json_schema' + - $ref: '#/components/schemas/process_json_schema' allOf: - - $ref: '#/components/schemas/json_schema' - json_schema: + - $ref: '#/components/schemas/process_json_schema' + process_json_schema: type: object title: Single data type description: |- @@ -5869,6 +5872,23 @@ components: JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). This allows clients to consume the schemas much better. Clients are not expected to support dereferencing `$refs`. + Note: The specified schema is only a common subset of JSON Schema. Additional keywords MAY be used. + allOf: + - $ref: '#/components/schemas/json_schema' + - properties: + subtype: + type: string + description: The allowed sub data type for a value. See the chapter on [subtypes](#section/Processes/Defining-Processes) for more information. + deprecated: + $ref: '#/components/schemas/deprecated' + json_schema: + type: object + title: JSON Schema + description: |- + A JSON Schema compliant to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html). + JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). This allows clients to consume the schemas much better. + Clients are not expected to support dereferencing `$refs`. + Note: The specified schema is only a common subset of JSON Schema. Additional keywords MAY be used. properties: type: @@ -5883,9 +5903,6 @@ components: uniqueItems: true items: $ref: '#/components/schemas/json_schema_type' - subtype: - type: string - description: The allowed sub data type for a value. See the chapter on [subtypes](#section/Processes/Defining-Processes) for more information. pattern: type: "string" format: "regex" @@ -5917,9 +5934,11 @@ components: items: $ref: '#/components/schemas/json_schema' - $ref: '#/components/schemas/json_schema' - deprecated: - $ref: '#/components/schemas/deprecated' - additionalProperties: true + additionalProperties: + description: >- + You can add any other property supported by JSON Schema, either + [draft-07](https://json-schema.org/draft-07/json-schema-validation.html) + or any later version. json_schema_type: type: string enum: