Skip to content

Commit

Permalink
Fix check that disallows bands in item properties when no asset has b…
Browse files Browse the repository at this point in the history
…ands
  • Loading branch information
m-mohr committed Aug 8, 2024
1 parent 5c42475 commit 7e0aabe
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions item-spec/json-schema/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
{
"$comment": "The if-then-else below checks whether the bands field is given in assets or not. If not, allows bands in properties (then), otherwise, disallows bands in properties (else).",
"if": {
"$comment": "If there is no asset with bands...",
"required": [
"assets"
],
Expand All @@ -187,27 +188,20 @@
}
},
"then": {
"$comment": "... then bands are not allowed in properties...",
"properties": {
"properties": {
"anyOf": [
{
"$ref": "bands.json"
},
{
"properties": {
"bands": false
}
}
]
"properties": {
"bands": false
}
}
}
},
"else": {
"$comment": "... otherwise bands are allowed in properties.",
"properties": {
"properties": {
"properties": {
"bands": false
}
"$ref": "bands.json"
}
}
}
Expand Down

0 comments on commit 7e0aabe

Please sign in to comment.