From 11579661d88ae46829ac9b396b6cabe5881f0eb1 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Tue, 23 Nov 2021 10:44:39 +1300 Subject: [PATCH 1/5] feat: Fix strict ajv warnings in LINZ extension See . --- extensions/linz/schema.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/extensions/linz/schema.json b/extensions/linz/schema.json index 0890738d..9917111d 100644 --- a/extensions/linz/schema.json +++ b/extensions/linz/schema.json @@ -22,6 +22,7 @@ { "$comment": "Type-specific schemas", "if": { + "type": "object", "properties": { "type": { "const": "Collection" @@ -88,6 +89,7 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { "const": "Feature" @@ -940,9 +942,11 @@ } }, "linz:asset_summaries": { + "type": "object", "required": ["created", "updated"], "properties": { "created": { + "type": "object", "required": ["minimum", "maximum"], "properties": { "minimum": { @@ -956,6 +960,7 @@ } }, "updated": { + "type": "object", "required": ["minimum", "maximum"], "properties": { "minimum": { @@ -984,8 +989,10 @@ "allOf": [ { "contains": { + "type": "object", "properties": { "roles": { + "type": "array", "contains": { "const": "manager" } @@ -995,8 +1002,10 @@ }, { "contains": { + "type": "object", "properties": { "roles": { + "type": "array", "contains": { "const": "custodian" } @@ -1045,9 +1054,12 @@ "providers": { "allOf": [ { + "type": "array", "contains": { + "type": "object", "properties": { "roles": { + "type": "array", "contains": { "const": "licensor" } @@ -1056,9 +1068,12 @@ } }, { + "type": "array", "contains": { + "type": "object", "properties": { "roles": { + "type": "array", "contains": { "const": "producer" } From 9551751d627621a520052b8fcd38d5893b2dcdf4 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Tue, 23 Nov 2021 10:47:38 +1300 Subject: [PATCH 2/5] feat: Fix strict ajv warnings in template extension See . --- extensions/template/schema.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/template/schema.json b/extensions/template/schema.json index d6672872..5b5a22cf 100644 --- a/extensions/template/schema.json +++ b/extensions/template/schema.json @@ -20,6 +20,7 @@ "properties": { "allOf": [ { + "type": "object", "$comment": "Require fields here for Item Properties.", "required": ["template:new_field"] }, @@ -142,9 +143,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": { From 67ef9a65617cc6d00469e339c171c9509916495b Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Tue, 23 Nov 2021 10:51:28 +1300 Subject: [PATCH 3/5] feat: Fix strict ajv warnings in historical-imagery extension See . --- extensions/historical-imagery/schema.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/extensions/historical-imagery/schema.json b/extensions/historical-imagery/schema.json index 5cea4e23..1f2e41bd 100644 --- a/extensions/historical-imagery/schema.json +++ b/extensions/historical-imagery/schema.json @@ -12,6 +12,7 @@ }, { "if": { + "type": "object", "properties": { "type": { "const": "Feature" @@ -34,6 +35,7 @@ "type": "object", "$comment": "Require fields here for Item Asset Properties.", "additionalProperties": { + "type": "object", "required": ["eo:bands"] } } @@ -43,6 +45,7 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { "const": "Collection" @@ -121,9 +124,12 @@ "providers": { "allOf": [ { + "type": "array", "contains": { + "type": "object", "properties": { "roles": { + "type": "array", "contains": { "const": "licensor" } @@ -132,9 +138,12 @@ } }, { + "type": "array", "contains": { + "type": "object", "properties": { "roles": { + "type": "array", "contains": { "const": "producer" } @@ -143,9 +152,12 @@ } }, { + "type": "array", "contains": { + "type": "object", "properties": { "roles": { + "type": "array", "contains": { "const": "processor" } @@ -154,9 +166,12 @@ } }, { + "type": "array", "contains": { + "type": "object", "properties": { "roles": { + "type": "array", "contains": { "const": "host" } @@ -167,6 +182,7 @@ ] }, "summaries": { + "type": "object", "required": ["platform", "mission", "proj:epsg"], "properties": { "platform": { From 6d23bdb77a0b81873d0345135eb2cfaacdef7636 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Tue, 23 Nov 2021 10:52:28 +1300 Subject: [PATCH 4/5] feat: Fix strict ajv warnings in aerial-photo extension See . --- extensions/aerial-photo/schema.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/aerial-photo/schema.json b/extensions/aerial-photo/schema.json index be494750..fedf2041 100644 --- a/extensions/aerial-photo/schema.json +++ b/extensions/aerial-photo/schema.json @@ -9,6 +9,7 @@ }, { "if": { + "type": "object", "properties": { "type": { "const": "Feature" @@ -25,6 +26,7 @@ "properties": { "allOf": [ { + "type": "object", "required": ["aerial-photo:run", "aerial-photo:sequence_number"] }, { @@ -44,6 +46,7 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { "const": "Collection" From c9045c197c2111d41531aa9ef39670c2a8c9b044 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Tue, 23 Nov 2021 10:53:21 +1300 Subject: [PATCH 5/5] feat: Fix strict ajv warnings in film extension See . These are the last warnings in our schemas - see `npx ospec 2> >(grep --fixed-strings --invert-match --regex='stac-extensions.github.io' --regex=schemas.stacspec.org >&2)`. --- extensions/film/schema.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/film/schema.json b/extensions/film/schema.json index 85d949fd..8312b1d6 100644 --- a/extensions/film/schema.json +++ b/extensions/film/schema.json @@ -9,6 +9,7 @@ }, { "if": { + "type": "object", "properties": { "type": { "const": "Feature" @@ -25,6 +26,7 @@ "properties": { "allOf": [ { + "type": "object", "required": ["film:id", "film:negative_sequence"] }, { @@ -44,6 +46,7 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { "const": "Collection"