Optimize our jsonschema by using refs (#13271)

* fix some broken info.json files

* optimize our jsonschema using refs

* fix formatting after vscode broke it

* make flake8 happy

* cleanup

* make our schema validation more compact and flexible
This commit is contained in:
Zach White 2021-06-24 20:48:53 -07:00 committed by GitHub
parent 9d4412cb8b
commit b908275354
Failed to generate hash of commit
9 changed files with 351 additions and 310 deletions

View file

@ -1,34 +1,22 @@
{
"$id": "qmk.api.keyboard.v1",
"allOf": [
{ "$ref": "qmk.keyboard.v1" },
{"$ref": "qmk.keyboard.v1"},
{
"$id": "qmk.api.keyboard.v1",
"keymaps": {
"type": "string"
},
"parse_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"parse_warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"processor_type": {
"type": "string"
},
"protocol": {
"type": "string"
},
"keyboard_folder": {
"type": "string"
},
"platform": {
"type": "string"
"properties": {
"keymaps": {
"type": "object",
"properties": {
"url": {"type": "string"}
}
},
"parse_errors": {"$ref": "qmk.definitions.v1#/string_array"},
"parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"},
"processor_type": {"type": "string"},
"protocol": {"type": "string"},
"keyboard_folder": {"type": "string"},
"platform": {"type": "string"}
}
}
]