diff --git a/CHANGELOG.md b/CHANGELOG.md index 278c5c0f9..1ddcba8fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Removed ### Fixed +- Fixed several JSON Schemas - Fixed examples ## [v1.0.0-beta.1] - 2020-05-29 diff --git a/extensions/datacube/json-schema/schema.json b/extensions/datacube/json-schema/schema.json index 89e875b35..ee64d4949 100644 --- a/extensions/datacube/json-schema/schema.json +++ b/extensions/datacube/json-schema/schema.json @@ -117,19 +117,19 @@ ] }, "description": { - "$ref": "#/definitions/fields/description" + "$ref": "#/definitions/description" }, "extent": { - "$ref": "#/definitions/fields/extent_open" + "$ref": "#/definitions/extent_open" }, "values": { - "$ref": "#/definitions/fields/values" + "$ref": "#/definitions/values" }, "step": { - "$ref": "#/definitions/fields/step" + "$ref": "#/definitions/step" }, "unit": { - "$ref": "#/definitions/fields/unit" + "$ref": "#/definitions/unit" }, "reference_system": { "type": "string" @@ -146,25 +146,25 @@ ], "properties": { "type": { - "$ref": "#/definitions/fields/type_spatial" + "$ref": "#/definitions/type_spatial" }, "axis": { - "$ref": "#/definitions/fields/axis_xy" + "$ref": "#/definitions/axis_xy" }, "description": { - "$ref": "#/definitions/fields/description" + "$ref": "#/definitions/description" }, "extent": { - "$ref": "#/definitions/fields/extent_closed" + "$ref": "#/definitions/extent_closed" }, "values": { - "$ref": "#/definitions/fields/values_numeric" + "$ref": "#/definitions/values_numeric" }, "step": { - "$ref": "#/definitions/fields/step" + "$ref": "#/definitions/step" }, "reference_system": { - "$ref": "#/definitions/fields/reference_system_spatial" + "$ref": "#/definitions/reference_system_spatial" } } }, @@ -189,28 +189,28 @@ ], "properties": { "type": { - "$ref": "#/definitions/fields/type_spatial" + "$ref": "#/definitions/type_spatial" }, "axis": { - "$ref": "#/definitions/fields/axis_z" + "$ref": "#/definitions/axis_z" }, "description": { - "$ref": "#/definitions/fields/description" + "$ref": "#/definitions/description" }, "extent": { - "$ref": "#/definitions/fields/extent_open" + "$ref": "#/definitions/extent_open" }, "values": { - "$ref": "#/definitions/fields/values" + "$ref": "#/definitions/values" }, "step": { - "$ref": "#/definitions/fields/step" + "$ref": "#/definitions/step" }, "unit": { - "$ref": "#/definitions/fields/unit" + "$ref": "#/definitions/unit" }, "reference_system": { - "$ref": "#/definitions/fields/reference_system_spatial" + "$ref": "#/definitions/reference_system_spatial" } } }, @@ -230,7 +230,7 @@ "const": "temporal" }, "description": { - "$ref": "#/definitions/fields/description" + "$ref": "#/definitions/description" }, "values": { "type": "array", @@ -259,82 +259,80 @@ } } }, - "fields": { - "type_spatial": { - "type": "string", - "const": "spatial" - }, - "axis_xy": { - "type": "string", - "enum": [ - "x", - "y" - ] - }, - "axis_z": { - "type": "string", - "const": "z" - }, - "extent_closed": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "items": { - "type": "number" - } - }, - "extent_open": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "items": { - "type": [ - "number", - "null" - ] - } - }, - "values_numeric": { - "type": "array", - "minItems": 1, - "items": { - "type": "number" - } - }, - "values": { - "type": "array", - "minItems": 1, - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } - }, - "step": { + "type_spatial": { + "type": "string", + "const": "spatial" + }, + "axis_xy": { + "type": "string", + "enum": [ + "x", + "y" + ] + }, + "axis_z": { + "type": "string", + "const": "z" + }, + "extent_closed": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number" + } + }, + "extent_open": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { "type": [ "number", "null" ] - }, - "unit": { - "type": "string" - }, - "reference_system_spatial": { - "type": [ - "string", - "number", - "object" - ], - "default": 4326 - }, - "description": { - "type": "string" } + }, + "values_numeric": { + "type": "array", + "minItems": 1, + "items": { + "type": "number" + } + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "step": { + "type": [ + "number", + "null" + ] + }, + "unit": { + "type": "string" + }, + "reference_system_spatial": { + "type": [ + "string", + "number", + "object" + ], + "default": 4326 + }, + "description": { + "type": "string" } } } \ No newline at end of file diff --git a/extensions/single-file-stac/json-schema/schema.json b/extensions/single-file-stac/json-schema/schema.json index 7a247d28e..b4adaf0d7 100644 --- a/extensions/single-file-stac/json-schema/schema.json +++ b/extensions/single-file-stac/json-schema/schema.json @@ -5,7 +5,7 @@ "description": "Single File STAC Extension to combine Collections and Items in single file catalog", "allOf": [ { - "$ref": "../../catalog-spec/json-schema/catalog.json" + "$ref": "../../../catalog-spec/json-schema/catalog.json" }, { "$ref": "https://geojson.org/schema/FeatureCollection.json" @@ -31,13 +31,13 @@ "collections": { "type": "array", "items": { - "$ref": "../../collection-spec/json-schema/collection.json" + "$ref": "../../../collection-spec/json-schema/collection.json" } }, "features": { "type": "array", "items": { - "$ref": "../../item-spec/json-schema/item.json" + "$ref": "../../../item-spec/json-schema/item.json" } } } diff --git a/item-spec/json-schema/datetime.json b/item-spec/json-schema/datetime.json index fe8dd55ae..e87ae5385 100644 --- a/item-spec/json-schema/datetime.json +++ b/item-spec/json-schema/datetime.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "datetime.json#", "title": "Date and Time Fields", "type": "object", "allOf": [ @@ -22,7 +22,7 @@ ], "properties": { "datetime": { - "$ref": "#/definitions/datetime_string" + "$ref": "#/definitions/datetime" }, "start_datetime": { "$ref": "#/definitions/start_datetime" @@ -54,7 +54,7 @@ "datetime": { "oneOf": [ { - "$ref": "#/definitions/datetime_string" + "$ref": "#/definitions/datetime" }, { "type": ["null"], @@ -74,6 +74,24 @@ } ], "definitions": { + "datetime": { + "title": "Date and Time", + "description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, + "start_datetime": { + "title": "Start Date and Time", + "description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, + "end_datetime": { + "title": "End Date and Time", + "description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, "created": { "title": "Creation Time", "type": "string", diff --git a/item-spec/json-schema/instrument.json b/item-spec/json-schema/instrument.json index a42f22a28..9a9f508ff 100644 --- a/item-spec/json-schema/instrument.json +++ b/item-spec/json-schema/instrument.json @@ -26,6 +26,6 @@ "gsd": { "title": "Ground Sample Distance", "type": "number" - }, + } } } \ No newline at end of file diff --git a/item-spec/json-schema/item.json b/item-spec/json-schema/item.json index 952e974aa..f3e1bab61 100644 --- a/item-spec/json-schema/item.json +++ b/item-spec/json-schema/item.json @@ -4,7 +4,6 @@ "title": "STAC Item", "type": "object", "description": "This object represents the metadata for an item in a SpatioTemporal Asset Catalog.", - "additionalProperties": true, "allOf": [ { "$ref": "#/definitions/core"