diff options
Diffstat (limited to 'data/schemas')
-rw-r--r-- | data/schemas/definitions.jsonschema | 32 | ||||
-rw-r--r-- | data/schemas/keyboard.jsonschema | 36 | ||||
-rw-r--r-- | data/schemas/keycodes.jsonschema | 10 | ||||
-rw-r--r-- | data/schemas/keymap.jsonschema | 1 |
4 files changed, 70 insertions, 9 deletions
diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema index 94a94157c0..b9c64a55ec 100644 --- a/data/schemas/definitions.jsonschema +++ b/data/schemas/definitions.jsonschema @@ -71,6 +71,38 @@ "type": "string", "pattern": "^[0-9a-z][0-9a-z_/]*$" }, + "keycode": { + "type": "string", + "minLength": 2, + "maxLength": 50, + "pattern": "^[A-Z][A-Zs_0-9]*$" + }, + "keycode_short": { + "type": "string", + "minLength": 2, + "maxLength": 7, + "pattern": "^[A-Z][A-Zs_0-9]*$" + }, + "keycode_decl": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": {"$ref": "#/keycode"}, + "label": {"$ref": "#/text_identifier"}, + "aliases": { + "type": "array", + "minItems": 1, + "items": {"$ref": "#/keycode_short"} + } + } + }, + "keycode_decl_array": { + "type": "array", + "minItems": 1 + "items": {"$ref": "#/keycode_decl"} + }, "mcu_pin_array": { "type": "array", "items": {"$ref": "#/mcu_pin"} diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 2afc1ed516..6c4ff49855 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -35,7 +35,7 @@ }, "development_board": { "type": "string", - "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios"] + "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris"] }, "pin_compatible": { "type": "string", @@ -96,6 +96,19 @@ "unknown" ] }, + "apa102": { + "type": "object", + "additionalProperties": false, + "properties": { + "data_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "clock_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "default_brightness": { + "type": "integer", + "minimum": 0, + "maximum": 31 + } + } + }, "audio": { "type": "object", "additionalProperties": false, @@ -214,7 +227,8 @@ "enabled": {"type": "boolean"}, "both_shifts_turns_on": {"type": "boolean"}, "double_tap_shift_turns_on": {"type": "boolean"}, - "idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + "idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "invert_on_shift": {"type": "boolean"} } }, "combo": { @@ -228,6 +242,11 @@ "type": "array", "items": {"$ref": "qmk.definitions.v1#/filename"} }, + "eeprom": { + "properties": { + "driver": {"type": "string"} + } + }, "encoder": { "$ref": "#/definitions/encoder_config", "properties": { @@ -246,6 +265,7 @@ "on_state": {"$ref": "qmk.definitions.v1#/bit"} } }, + "keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"}, "layout_aliases": { "type": "object", "additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"} @@ -686,6 +706,18 @@ "led": {"$ref": "qmk.definitions.v1#/mcu_pin"}, "speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"} } + }, + "ws2812": { + "type": "object", + "additionalProperties": false, + "properties": { + "driver": { + "type": "string", + "enum": ["bitbang", "custom", "i2c", "pwm", "spi", "vendor"] + }, + "i2c_address": {"$ref": "qmk.definitions.v1#/hex_number_2d"}, + "i2c_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } } } } diff --git a/data/schemas/keycodes.jsonschema b/data/schemas/keycodes.jsonschema index 77a8347b3b..df6ce95a83 100644 --- a/data/schemas/keycodes.jsonschema +++ b/data/schemas/keycodes.jsonschema @@ -8,11 +8,7 @@ "type": "string", "minLength": 2, "maxLength": 50, - "pattern": "^[A-Zs_0-9]*$" - }, - "hex_number_4d": { - "type": "string", - "pattern": "^0x[0-9A-F]{4}$" + "pattern": "^[A-Z][A-Zs_0-9]*$" } }, "properties": { @@ -34,10 +30,10 @@ "keycodes": { "type": "object", "propertyNames": { - "$ref": "#/definitions/hex_number_4d" + "$ref": "qmk.definitions.v1#/hex_number_4d" }, "additionalProperties": { - "type": "object", + "type": "object", // use 'qmk.definitions.v1#/keycode_decl' when problem keycodes are removed "required": [ "key" ], diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema index 73aa7c5c22..7233e896e9 100644 --- a/data/schemas/keymap.jsonschema +++ b/data/schemas/keymap.jsonschema @@ -67,6 +67,7 @@ } } }, + "keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"}, "config": {"$ref": "qmk.keyboard.v1"}, "notes": { "type": "string" |