Skip to content

Commit

Permalink
fix: Include third party schemas on top level (#101)
Browse files Browse the repository at this point in the history
Also de-duplicate references.
  • Loading branch information
l0b0 authored Oct 8, 2021
1 parent 5c8c1fc commit da277db
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 46 deletions.
10 changes: 8 additions & 2 deletions extensions/linz/examples/item.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json"],
"stac_extensions": [
"https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json",
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/version/v1.0.0/schema.json"
],
"type": "Feature",
"id": "item",
"bbox": [172.9, 1.3, 173, 1.4],
Expand All @@ -17,7 +21,9 @@
]
},
"properties": {
"datetime": "2020-12-11T22:38:32Z"
"datetime": "2020-12-11T22:38:32Z",
"proj:epsg": 123,
"version": "1.0.0"
},
"links": [
{
Expand Down
87 changes: 43 additions & 44 deletions extensions/linz/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,56 @@
"$id": "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json",
"title": "LINZ STAC Extension",
"description": "LINZ STAC Extension.",
"oneOf": [
"allOf": [
{
"$comment": "This is the schema for STAC Items.",
"allOf": [
{
"type": "object",
"required": ["linz:geospatial_type"]
},
{
"$ref": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json#"
},
{
"$ref": "#/definitions/fields"
},
{
"$ref": "#/definitions/stac_extensions"
}
]
"$ref": "https://stac-extensions.github.io/version/v1.0.0/schema.json#"
},
{
"$comment": "This is the schema for STAC Collections.",
"allOf": [
"$ref": "https://stac-extensions.github.io/projection/v1.0.0/schema.json#"
},
{
"$ref": "#/definitions/fields"
},
{
"$ref": "#/definitions/stac_extensions"
},
{
"$comment": "Type-specific schemas",
"oneOf": [
{
"type": "object",
"required": [
"linz:created",
"linz:lifecycle",
"linz:providers",
"linz:security_classification",
"linz:updated",
"providers",
"title"
"$comment": "This is the schema for STAC Items.",
"allOf": [
{
"type": "object",
"required": ["linz:geospatial_type"]
},
{
"$ref": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json#"
}
]
},
{
"$ref": "https://schemas.stacspec.org/v1.0.0/collection-spec/json-schema/collection.json#"
},
{
"$ref": "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json#"
},
{
"$ref": "https://stac-extensions.github.io/version/v1.0.0/schema.json#"
},
{
"$ref": "https://stac-extensions.github.io/projection/v1.0.0/schema.json#"
},
{
"$ref": "#/definitions/fields"
},
{
"$ref": "#/definitions/stac_extensions"
"$comment": "This is the schema for STAC Collections.",
"allOf": [
{
"type": "object",
"required": [
"linz:created",
"linz:lifecycle",
"linz:providers",
"linz:security_classification",
"linz:updated",
"providers",
"title"
]
},
{
"$ref": "https://schemas.stacspec.org/v1.0.0/collection-spec/json-schema/collection.json#"
},
{
"$ref": "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json#"
}
]
}
]
}
Expand Down

0 comments on commit da277db

Please sign in to comment.