Skip to content

Commit

Permalink
deploy: cf74931
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Jul 24, 2024
1 parent cf4db37 commit 34a544b
Showing 1 changed file with 185 additions and 69 deletions.
254 changes: 185 additions & 69 deletions v0.1.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"description": "STAC Attribution Extension for STAC Items and STAC Collections.",
"type": "object",
"required": [
"stac_extensions"
"stac_extensions",
"type"
],
"properties": {
"stac_extensions": {
Expand All @@ -15,91 +16,169 @@
}
}
},
"oneOf": [
"allOf": [
{
"type": "object",
"required": [
"type",
"properties",
"assets"
],
"properties": {
"type": {
"const": "Feature"
"$comment": "Items",
"if": {
"properties": {
"type": {
"const": "Feature"
}
}
},
"anyOf": [
{
"$ref": "#/definitions/properties"

},
{
"$ref": "#/definitions/assets"
}
]
"then": {
"allOf": [
{
"properties": {
"properties": {
"$ref": "#/definitions/validate_properties"
}
}
},
{
"$ref": "#/definitions/validate_assets"
},
{
"$ref": "#/definitions/validate_links"
}
],
"anyOf": [
{
"required": [
"properties"
],
"properties": {
"properties": {
"$ref": "#/definitions/require_properties"
}
}
},
{
"$ref": "#/definitions/require_assets"
},
{
"$ref": "#/definitions/require_links"
}
]
}
},
{
"required": [
"type"
],
"properties": {
"type": {
"const": "Collection"
"$comment": "Collections",
"if": {
"properties": {
"type": {
"const": "Collection"
}
}
},
"anyOf": [
{
"$ref": "#/definitions/properties"
},
{
"$ref": "#/definitions/assets"
},
{
"required": [
"item_assets"
],
"properties": {
"item_assets": {
"$ref": "#/definitions/assets"
"then": {
"allOf": [
{
"$ref": "#/definitions/validate_properties"
},
{
"$ref": "#/definitions/validate_assets"
},
{
"properties": {
"item_assets": {
"$ref": "#/definitions/validate_assets"
}
}
},
{
"$ref": "#/definitions/validate_links"
},
{
"properties": {
"summaries": {
"type": [
"array",
"object"
],
"items": {
"$ref": "#/definitions/attribution"
}
}
}
}
},
{
"required": [
"summaries"
],
"properties": {
"summaries": {
"type": "object",
"required": [
"attribution"
],
"properties": {
"attribution": {
"type": "array",
"items": {
"$ref": "#/definitions/attribution"
}
],
"anyOf": [
{
"$ref": "#/definitions/require_properties"
},
{
"$ref": "#/definitions/require_assets"
},
{
"required": [
"item_assets"
],
"properties": {
"item_assets": {
"$ref": "#/definitions/asset_contains"
}
}
},
{
"$ref": "#/definitions/require_links"
},
{
"required": [
"summaries"
],
"properties": {
"summaries": {
"type": [
"array",
"object"
],
"items": {
"$ref": "#/definitions/attribution"
}
}
}
}
]
}
},
{
"$comment": "Catalogs",
"if": {
"properties": {
"type": {
"const": "Catalog"
}
}
]
},
"then": {
"allOf": [
{
"$ref": "#/definitions/validate_properties"
},
{
"$ref": "#/definitions/validate_links"
}
],
"anyOf": [
{
"$ref": "#/definitions/require_properties"
},
{
"$ref": "#/definitions/require_links"
}
]
}
}
],
"definitions": {
"properties": {
"required": [
"attribution"
],
"allOf": [
{
"$ref": "#/definitions/fields"
}
]
"require_properties": {
"$ref": "#/definitions/require_fields"
},
"validate_properties": {
"$ref": "#/definitions/fields"
},
"assets": {
"require_assets": {
"required": [
"assets"
],
Expand All @@ -109,16 +188,53 @@
}
}
},
"validate_assets": {
"properties": {
"assets": {
"additionalProperties": {
"$ref": "#/definitions/fields"
}
}
}
},
"require_links": {
"required": [
"links"
],
"properties": {
"links": {
"type": "array",
"contains": {
"$ref": "#/definitions/require_fields"
}
}
}
},
"validate_links": {
"properties": {
"links": {
"type": "array",
"items": {
"$ref": "#/definitions/fields"
}
}
}
},
"asset_contains": {
"type": "object",
"not": {
"additionalProperties": {
"not": {
"$ref": "#/definitions/properties"
"$ref": "#/definitions/require_fields"
}
}
}
},
"require_fields": {
"required": [
"attribution"
]
},
"fields": {
"type": "object",
"properties": {
Expand Down

0 comments on commit 34a544b

Please sign in to comment.