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" } } }