Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

name in label:classes can be null #8

Merged
merged 4 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- `label:properties` as array needs at least one item
- `name` in `label:classes` must be non-empty
- `name` in `label:classes` must be non-empty or null
cuttlefish marked this conversation as resolved.
Show resolved Hide resolved
- `label:description` must be non-empty

### Deprecated
Expand Down
38 changes: 35 additions & 3 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@
],
"properties": {
"name": {
"title": "Name",
"type": "string",
"minLength": 1
"title": "Name"
},
"classes": {
"title": "Classes",
Expand Down Expand Up @@ -243,6 +241,40 @@
}
}
},
"if": {
"properties": {
"label:type": {
"const": "raster"
}
}
},
"then": {
"properties": {
"label:classes": {
"items": {
"properties": {
"name": {
"type": "null"
}
}
}
}
}
},
"else": {
"properties": {
"label:classes": {
"items": {
"properties": {
"name": {
"type": "string",
"minLength": 1
}
}
}
}
}
},
"patternProperties": {
"^(?!label:)": {}
},
Expand Down