Skip to content

Commit

Permalink
name in label:classes can only be null if label:type is "raster"
Browse files Browse the repository at this point in the history
  • Loading branch information
cuttlefish committed Aug 20, 2021
1 parent a660cb7 commit 58a78a5
Showing 1 changed file with 44 additions and 10 deletions.
54 changes: 44 additions & 10 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,7 @@
],
"properties": {
"name": {
"title": "Name",
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
"title": "Name"
},
"classes": {
"title": "Classes",
Expand Down Expand Up @@ -250,6 +241,49 @@
}
}
},
"if": {
"properties": {
"label:type": {
"const": "raster"
}
}
},
"then": {
"properties": {
"label:classes": {
"items": {
"properties": {
"name": {
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
}
}
}
}
},
"else": {
"properties": {
"label:classes": {
"items": {
"properties": {
"name": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
},
"patternProperties": {
"^(?!label:)": {}
},
Expand Down

0 comments on commit 58a78a5

Please sign in to comment.