From 639b9a0ce57a27daef317e777a7a38d447a7a352 Mon Sep 17 00:00:00 2001 From: STAC CI Date: Thu, 8 Aug 2024 15:43:17 +0000 Subject: [PATCH] Publish JSON Schemas [ci skip] --- .../json-schema/collection.json | 62 ++++++++++--------- .../item-spec/json-schema/bands.json | 42 ++++++------- v1.1.0-beta.1/item-spec/json-schema/item.json | 20 +++--- 3 files changed, 60 insertions(+), 64 deletions(-) diff --git a/v1.1.0-beta.1/collection-spec/json-schema/collection.json b/v1.1.0-beta.1/collection-spec/json-schema/collection.json index befb8489..0a510f28 100644 --- a/v1.1.0-beta.1/collection-spec/json-schema/collection.json +++ b/v1.1.0-beta.1/collection-spec/json-schema/collection.json @@ -132,40 +132,42 @@ "$ref": "../../item-spec/json-schema/item.json#/definitions/assets" }, "item_assets": { - "allOf": [ - { - "type": "object", - "minProperties": 2, - "properties": { - "href": { - "title": "Disallow href", - "not": {} - }, - "title": { - "title": "Asset title", - "type": "string" - }, - "description": { - "title": "Asset description", - "type": "string" - }, - "type": { - "title": "Asset type", - "type": "string" - }, - "roles": { - "title": "Asset roles", - "type": "array", - "items": { + "additionalProperties": { + "allOf": [ + { + "type": "object", + "minProperties": 2, + "properties": { + "href": { + "title": "Disallow href", + "not": {} + }, + "title": { + "title": "Asset title", + "type": "string" + }, + "description": { + "title": "Asset description", "type": "string" + }, + "type": { + "title": "Asset type", + "type": "string" + }, + "roles": { + "title": "Asset roles", + "type": "array", + "items": { + "type": "string" + } } } + }, + { + "$ref": "../../item-spec/json-schema/common.json" } - }, - { - "$ref": "../../item-spec/json-schema/common.json" - } - ] + ] + } }, "links": { "$ref": "../../item-spec/json-schema/item.json#/definitions/links" diff --git a/v1.1.0-beta.1/item-spec/json-schema/bands.json b/v1.1.0-beta.1/item-spec/json-schema/bands.json index 4440760a..bb059549 100644 --- a/v1.1.0-beta.1/item-spec/json-schema/bands.json +++ b/v1.1.0-beta.1/item-spec/json-schema/bands.json @@ -1,24 +1,24 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schemas.stacspec.org/v1.1.0-beta.1/item-spec/json-schema/bands.json", - "title": "Bands Field", - "type": "object", - "properties": { - "bands": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "allOf": [ - { - "$ref": "common.json" - } - ] - } + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://schemas.stacspec.org/v1.1.0-beta.1/item-spec/json-schema/bands.json", + "title": "Bands Field", + "type": "object", + "properties": { + "bands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "allOf": [ + { + "$ref": "common.json" + } + ] } } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/v1.1.0-beta.1/item-spec/json-schema/item.json b/v1.1.0-beta.1/item-spec/json-schema/item.json index 797c54cf..ca0b755b 100644 --- a/v1.1.0-beta.1/item-spec/json-schema/item.json +++ b/v1.1.0-beta.1/item-spec/json-schema/item.json @@ -172,6 +172,7 @@ { "$comment": "The if-then-else below checks whether the bands field is given in assets or not. If not, allows bands in properties (then), otherwise, disallows bands in properties (else).", "if": { + "$comment": "If there is no asset with bands...", "required": [ "assets" ], @@ -187,27 +188,20 @@ } }, "then": { + "$comment": "... then bands are not allowed in properties...", "properties": { "properties": { - "anyOf": [ - { - "$ref": "bands.json" - }, - { - "properties": { - "bands": false - } - } - ] + "properties": { + "bands": false + } } } }, "else": { + "$comment": "... otherwise bands are allowed in properties.", "properties": { "properties": { - "properties": { - "bands": false - } + "$ref": "bands.json" } } }