Skip to content

Commit

Permalink
feat: Fix strict ajv warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
l0b0 committed Nov 17, 2021
1 parent 33fdc1e commit cbb5a3f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
1 change: 1 addition & 0 deletions extensions/aerial-photo/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"properties": {
"allOf": [
{
"type": "object",
"required": ["aerial-photo:run", "aerial-photo:sequence_number"]
},
{
Expand Down
1 change: 1 addition & 0 deletions extensions/film/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"properties": {
"allOf": [
{
"type": "object",
"required": ["film:id", "film:negative_sequence"]
},
{
Expand Down
21 changes: 21 additions & 0 deletions extensions/historical-imagery/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"type": "object",
"$comment": "Require fields here for Item Asset Properties.",
"additionalProperties": {
"type": "object",
"required": ["eo:bands"]
}
}
Expand Down Expand Up @@ -63,41 +64,49 @@
"type": "array",
"allOf": [
{
"type": "array",
"contains": {
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/historical-imagery/schema.json"
}
},
{
"type": "array",
"contains": {
"const": "https://stac-extensions.github.io/eo/v1.0.0/schema.json"
}
},
{
"type": "array",
"contains": {
"const": "https://stac-extensions.github.io/projection/v1.0.0/schema.json"
}
},
{
"type": "array",
"contains": {
"const": "https://stac-extensions.github.io/file/v2.0.0/schema.json"
}
},
{
"type": "array",
"contains": {
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/aerial-photo/schema.json"
}
},
{
"type": "array",
"contains": {
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/camera/schema.json"
}
},
{
"type": "array",
"contains": {
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/film/schema.json"
}
},
{
"type": "array",
"contains": {
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/scanning/schema.json"
}
Expand Down Expand Up @@ -125,9 +134,12 @@
"providers": {
"allOf": [
{
"type": "array",
"contains": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"contains": {
"const": "licensor"
}
Expand All @@ -136,9 +148,12 @@
}
},
{
"type": "array",
"contains": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"contains": {
"const": "producer"
}
Expand All @@ -147,9 +162,12 @@
}
},
{
"type": "array",
"contains": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"contains": {
"const": "processor"
}
Expand All @@ -158,9 +176,12 @@
}
},
{
"type": "array",
"contains": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"contains": {
"const": "host"
}
Expand Down
12 changes: 12 additions & 0 deletions extensions/linz/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@
"linz:providers": {
"allOf": [
{
"type": "array",
"contains": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"contains": {
"const": "manager"
}
Expand All @@ -131,9 +134,12 @@
}
},
{
"type": "array",
"contains": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"contains": {
"const": "custodian"
}
Expand Down Expand Up @@ -178,9 +184,12 @@
"providers": {
"allOf": [
{
"type": "array",
"contains": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"contains": {
"const": "licensor"
}
Expand All @@ -189,9 +198,12 @@
}
},
{
"type": "array",
"contains": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"contains": {
"const": "producer"
}
Expand Down
12 changes: 9 additions & 3 deletions extensions/template/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"properties": {
"allOf": [
{
"type": "object",
"$comment": "Require fields here for Item Properties.",
"required": ["template:new_field"]
},
Expand All @@ -44,6 +45,7 @@
"type": "object",
"allOf": [
{
"type": "object",
"required": ["type"],
"properties": {
"type": {
Expand All @@ -60,6 +62,7 @@
"$comment": "This is the schema for the top-level fields in a Collection. Remove this if this extension does not define top-level fields for Collections.",
"allOf": [
{
"type": "object",
"$comment": "Require fields here for Collections (top-level).",
"required": ["template:new_field"]
},
Expand All @@ -69,6 +72,7 @@
]
},
{
"type": "object",
"$comment": "This validates the fields in Collection Assets, but does not require them.",
"required": ["assets"],
"properties": {
Expand All @@ -92,6 +96,7 @@
}
},
{
"type": "object",
"$comment": "This is the schema for the fields in Item Asset Definitions. It doesn't require any fields.",
"required": ["item_assets"],
"properties": {
Expand All @@ -115,6 +120,7 @@
}
},
{
"type": "object",
"$comment": "This is the schema for the fields in Summaries. By default, only checks the existence of the properties, but not the schema of the summaries.",
"required": ["summaries"],
"properties": {
Expand Down Expand Up @@ -142,9 +148,9 @@
"require_any_field": {
"$comment": "Please list all fields here so that we can force the existence of one of them in other parts of the schemas.",
"anyOf": [
{ "required": ["template:new_field"] },
{ "required": ["template:xyz"] },
{ "required": ["template:another_one"] }
{ "type": "object", "required": ["template:new_field"] },
{ "type": "object", "required": ["template:xyz"] },
{ "type": "object", "required": ["template:another_one"] }
]
},
"fields": {
Expand Down

0 comments on commit cbb5a3f

Please sign in to comment.