From 71ed8497c2c4d38e4d8cc029c5a5bac976ee4914 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Mon, 8 Apr 2024 09:33:18 -0600 Subject: [PATCH] fix: update jsonschema --- json-schema/schema.json | 133 ++++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 67 deletions(-) diff --git a/json-schema/schema.json b/json-schema/schema.json index 544b11e..4d3e5fa 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -1,97 +1,91 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json#", + "$id": "https://stac-extensions.github.io/pointcloud/v2.0.0/schema.json#", "title": "Point Cloud Extension", "description": "STAC Point Cloud Extension for STAC Items and STAC Collections.", + "type": "object", + "required": [ + "stac_extensions" + ], + "properties": { + "stac_extensions": { + "type": "array", + "contains": { + "const": "https://stac-extensions.github.io/pointcloud/v2.0.0/schema.json" + } + } + }, "oneOf": [ { "$comment": "This is the schema for STAC Items.", - "allOf": [ - { + "type": "object", + "required": [ + "type", + "properties", + "assets" + ], + "properties": { + "type": { + "const": "Feature" + }, + "properties": { + "$ref": "#/definitions/fields" + }, + "assets": { "type": "object", - "required": [ - "type", - "properties", - "assets" - ], + "additionalProperties": { + "$ref": "#/definitions/fields" + } + } + }, + "anyOf": [ + { "properties": { - "type": { - "const": "Feature" - }, "properties": { - "allOf": [ - { - "$comment": "Require fields here for item properties.", - "required": [ - "pc:count", - "pc:type" - ] - }, - { - "$ref": "#/definitions/fields" - } - ] - }, - "assets": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/fields" - } + "$ref": "#/definitions/require_any" } } }, { - "$ref": "#/definitions/stac_extensions" + "$ref": "#/definitions/require_in_assets" } ] }, { "$comment": "This is the schema for STAC Collections.", - "allOf": [ + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "const": "Collection" + }, + "assets": { + "$ref": "#/definitions/fields" + }, + "item_assets": { + "$ref": "#/definitions/fields" + } + }, + "anyOf": [ + { + "$ref": "#/definitions/require_in_item_assets" + }, + { + "$ref": "#/definitions/require_in_assets" + }, { - "type": "object", - "required": [ - "type" - ], "properties": { - "type": { - "const": "Collection" - }, - "assets": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/fields" - } - }, - "item_assets": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/fields" - } + "summaries": { + "$ref": "#/definitions/require_any" } } - }, - { - "$ref": "#/definitions/stac_extensions" } ] } ], "definitions": { - "stac_extensions": { - "type": "object", - "required": [ - "stac_extensions" - ], - "properties": { - "stac_extensions": { - "type": "array", - "contains": { - "const": "https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json" - } - } - } - }, "fields": { "type": "object", "properties": { @@ -122,6 +116,10 @@ } } }, + "required": [ + "count", + "type" + ], "patternProperties": { "^(?!pc:)": {} }, @@ -140,7 +138,8 @@ "minLength": 1 }, "size": { - "type": "integer" + "type": "integer", + "minimum": 0 }, "type": { "type": "string",