Skip to content

Commit 7e0aabe

Browse files
committed
Fix check that disallows bands in item properties when no asset has bands
1 parent 5c42475 commit 7e0aabe

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

item-spec/json-schema/item.json

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
{
173173
"$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).",
174174
"if": {
175+
"$comment": "If there is no asset with bands...",
175176
"required": [
176177
"assets"
177178
],
@@ -187,27 +188,20 @@
187188
}
188189
},
189190
"then": {
191+
"$comment": "... then bands are not allowed in properties...",
190192
"properties": {
191193
"properties": {
192-
"anyOf": [
193-
{
194-
"$ref": "bands.json"
195-
},
196-
{
197-
"properties": {
198-
"bands": false
199-
}
200-
}
201-
]
194+
"properties": {
195+
"bands": false
196+
}
202197
}
203198
}
204199
},
205200
"else": {
201+
"$comment": "... otherwise bands are allowed in properties.",
206202
"properties": {
207203
"properties": {
208-
"properties": {
209-
"bands": false
210-
}
204+
"$ref": "bands.json"
211205
}
212206
}
213207
}

0 commit comments

Comments
 (0)