From 112ad5feb56b8a40b4bf6e8fb40e7a0177182126 Mon Sep 17 00:00:00 2001 From: Daniel Silk Date: Mon, 27 Sep 2021 13:29:32 +1300 Subject: [PATCH] revert: reinstate stac_extensions schema definitions ref: eb3d4943b34e8e7e000bb5a407d72a536c9ea22d (commit being reverted) discussion: https://github.com/linz/stac/pull/60#discussion_r715257218 upstream issue: https://github.com/stac-extensions/template/issues/10 --- extensions/camera/schema.json | 15 +++++++++++++++ extensions/linz/schema.json | 15 +++++++++++++++ extensions/quality/schema.json | 12 ++++++++++++ extensions/template/schema.json | 18 ++++++++++++++++++ 4 files changed, 60 insertions(+) diff --git a/extensions/camera/schema.json b/extensions/camera/schema.json index c5c39457..81f3d304 100644 --- a/extensions/camera/schema.json +++ b/extensions/camera/schema.json @@ -21,9 +21,24 @@ } } } + }, + { + "$ref": "#/definitions/stac_extensions" } ], "definitions": { + "stac_extensions": { + "type": "object", + "required": ["stac_extensions"], + "properties": { + "stac_extensions": { + "type": "array", + "contains": { + "const": "https://linz.github.io/stac/_STAC_VERSION_/camera/schema.json" + } + } + } + }, "fields": { "type": "object", "properties": { diff --git a/extensions/linz/schema.json b/extensions/linz/schema.json index f35d73ae..c6ef6df2 100644 --- a/extensions/linz/schema.json +++ b/extensions/linz/schema.json @@ -15,9 +15,24 @@ }, { "$ref": "#/definitions/linz" + }, + { + "$ref": "#/definitions/stac_extensions" } ], "definitions": { + "stac_extensions": { + "type": "object", + "required": ["stac_extensions"], + "properties": { + "stac_extensions": { + "type": "array", + "contains": { + "const": "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json" + } + } + } + }, "linz": { "type": "object", "required": ["title", "linz:security_classification", "linz:created", "linz:updated"], diff --git a/extensions/quality/schema.json b/extensions/quality/schema.json index 20247cff..312888ce 100644 --- a/extensions/quality/schema.json +++ b/extensions/quality/schema.json @@ -11,6 +11,18 @@ } ], "definitions": { + "stac_extensions": { + "type": "object", + "required": ["stac_extensions"], + "properties": { + "stac_extensions": { + "type": "array", + "contains": { + "const": "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json" + } + } + } + }, "quality": { "type": "object", "properties": { diff --git a/extensions/template/schema.json b/extensions/template/schema.json index 5a25180d..c1a9ef9a 100644 --- a/extensions/template/schema.json +++ b/extensions/template/schema.json @@ -32,6 +32,9 @@ } } } + }, + { + "$ref": "#/definitions/stac_extensions" } ] }, @@ -59,6 +62,9 @@ } } }, + { + "$ref": "#/definitions/stac_extensions" + }, { "$comment": "Remove this object if this extension does not define top-level fields for Collections.", "$ref": "#/definitions/fields" @@ -67,6 +73,18 @@ } ], "definitions": { + "stac_extensions": { + "type": "object", + "required": ["stac_extensions"], + "properties": { + "stac_extensions": { + "type": "array", + "contains": { + "const": "https://linz.github.io/stac/_STAC_VERSION_/template/schema.json" + } + } + } + }, "fields": { "$comment": "Add your new fields here. Don't require them here, do that above in the item schema.", "type": "object",