summary refs log tree commit diff
path: root/data
diff options
context:
space:
mode:
authorErovia <Erovia@users.noreply.github.com>2022-02-28 20:02:39 +0000
committerGitHub <noreply@github.com>2022-02-28 20:02:39 +0000
commitfbfd5312b995a32af690c183cad0dc988f695e89 (patch)
treebf241a475ec51b79d6427ac422f197b6d3720661 /data
parent779c7debcfff1a4a3ad578a0c12bdd50cba11039 (diff)
CLI: Validate JSON keymap input (#16261)
* Fix schema validator

It should use the passed schema.

* Add required attributes to keymap schema

* Rework subcommands to validate the JSON keymaps

The 'compile', 'flash' and 'json2c' subcommands were reworked to add
JSON keymap validation so error is reported for non-JSON and
non-compliant-JSON inputs.

* Fix required fields in keymap schema

* Add tests

* Fix compiling keymaps directly from keymap directory

* Schema should not require version for now.
Diffstat (limited to 'data')
-rw-r--r--data/schemas/keymap.jsonschema7
1 files changed, 6 insertions, 1 deletions
diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema
index faa250a942..3803301a66 100644
--- a/data/schemas/keymap.jsonschema
+++ b/data/schemas/keymap.jsonschema
@@ -53,5 +53,10 @@
             "type": "string",
             "description": "asdf"
         }
-    }
+    },
+    "required": [
+        "keyboard",
+        "layout",
+        "layers"
+    ]
 }