diff options
author | Zach White <skullydazed@gmail.com> | 2021-06-24 20:48:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-24 20:48:53 -0700 |
commit | b908275354ba6cd9dd4d393dbbedfbd2ad0f316d (patch) | |
tree | 7efbb70c51fb917d203b629feb9eadf169f71c91 /data/schemas/api_keyboard.jsonschema | |
parent | 9d4412cb8bf9512952118b190fedea72e33d28cb (diff) |
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
Diffstat (limited to 'data/schemas/api_keyboard.jsonschema')
-rw-r--r-- | data/schemas/api_keyboard.jsonschema | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/data/schemas/api_keyboard.jsonschema b/data/schemas/api_keyboard.jsonschema index d570ee9990..d638658a1d 100644 --- a/data/schemas/api_keyboard.jsonschema +++ b/data/schemas/api_keyboard.jsonschema @@ -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"} } } ] |