Skip to content

Commit

Permalink
fix: update jsonschema
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Apr 8, 2024
1 parent bce245d commit 4fb236e
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 70 deletions.
2 changes: 1 addition & 1 deletion examples/example-autzen.json
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
"title": "USGS 3DEP LiDAR"
},
"stac_extensions": [
"https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json"
"https://stac-extensions.github.io/pointcloud/v2.0.0/schema.json"
],
"stac_version": "1.0.0",
"type": "Feature"
Expand Down
133 changes: 66 additions & 67 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -122,6 +116,10 @@
}
}
},
"required": [
"count",
"type"
],
"patternProperties": {
"^(?!pc:)": {}
},
Expand All @@ -140,7 +138,8 @@
"minLength": 1
},
"size": {
"type": "integer"
"type": "integer",
"minimum": 0
},
"type": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stac-extensions",
"version": "1.0.0",
"version": "2.0.0",
"scripts": {
"test": "npm run check-markdown && npm run check-examples",
"check-markdown": "remark . -f -r .github/remark.yaml",
Expand All @@ -17,4 +17,4 @@
"remark-validate-links": "^10.0.0",
"stac-node-validator": "^1.0.0"
}
}
}

0 comments on commit 4fb236e

Please sign in to comment.