mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-05-30 21:13:21 +00:00
Use relative paths for schemas, instead of $id. Enables VScode validation. (#25251)
This commit is contained in:
parent
f686ad9e63
commit
919e2a4f5c
27
.vscode/settings.json
vendored
27
.vscode/settings.json
vendored
@ -10,6 +10,13 @@
|
||||
"**/*.uf2": true
|
||||
},
|
||||
"files.associations": {
|
||||
// QMK Filetypes
|
||||
"keyboard.json": "jsonc",
|
||||
"info.json": "jsonc",
|
||||
"keymap.json": "jsonc",
|
||||
"qmk.json": "jsonc",
|
||||
"qmk_module.json": "jsonc",
|
||||
// Standard filetypes
|
||||
"*.h": "c",
|
||||
"*.c": "c",
|
||||
"*.inc": "c",
|
||||
@ -28,7 +35,23 @@
|
||||
"[json]": {
|
||||
"editor.formatOnSave": false
|
||||
},
|
||||
"clangd.arguments": [
|
||||
"--header-insertion=never"
|
||||
"clangd.arguments": ["--header-insertion=never"],
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": ["qmk.json"],
|
||||
"url": "./data/schemas/user_repo_v1_1.jsonschema"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["qmk_module.json"],
|
||||
"url": "./data/schemas/community_module.jsonschema"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["keyboard.json", "info.json"],
|
||||
"url": "./data/schemas/keyboard.jsonschema"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["keymap.json"],
|
||||
"url": "./data/schemas/keymap.jsonschema"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$id": "qmk.api.keyboard.v1",
|
||||
"allOf": [
|
||||
{"$ref": "qmk.keyboard.v1"},
|
||||
{"$ref": "./keyboard.jsonschema#"},
|
||||
{
|
||||
"properties": {
|
||||
"keymaps": {
|
||||
@ -10,8 +10,8 @@
|
||||
"url": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"parse_errors": {"$ref": "qmk.definitions.v1#/string_array"},
|
||||
"parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"},
|
||||
"parse_errors": {"$ref": "./definitions.jsonschema#/string_array"},
|
||||
"parse_warnings": {"$ref": "./definitions.jsonschema#/string_array"},
|
||||
"processor_type": {"type": "string"},
|
||||
"protocol": {"type": "string"},
|
||||
"keyboard_folder": {"type": "string"},
|
||||
|
@ -5,14 +5,14 @@
|
||||
"type": "object",
|
||||
"required": ["module_name", "maintainer"],
|
||||
"properties": {
|
||||
"module_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"module_name": {"$ref": "./definitions.jsonschema#/text_identifier"},
|
||||
"maintainer": {"$ref": "./definitions.jsonschema#/text_identifier"},
|
||||
"license": {"type": "string"},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
|
||||
"features": {"$ref": "qmk.keyboard.v1#/definitions/features_config"}
|
||||
"keycodes": {"$ref": "./definitions.jsonschema#/keycode_decl_array"},
|
||||
"features": {"$ref": "./keyboard.jsonschema#/definitions/features_config"}
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,9 @@
|
||||
"additionalProperties": false,
|
||||
"required": ["pin_a", "pin_b"],
|
||||
"properties": {
|
||||
"pin_a": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"pin_b": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"resolution": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"pin_a": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"pin_b": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"resolution": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,22 +28,22 @@
|
||||
"dip_switch_config": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||
"pins": {"$ref": "./definitions.jsonschema#/mcu_pin_array"}
|
||||
}
|
||||
},
|
||||
"features_config": {
|
||||
"$ref": "qmk.definitions.v1#/boolean_array",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"$ref": "./definitions.jsonschema#/boolean_array",
|
||||
"propertyNames": {"$ref": "./definitions.jsonschema#/snake_case"},
|
||||
"not": {"required": ["lto"]}
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"not": {"required": ["vendorId", "productId"]}, // reject via keys...
|
||||
"properties": {
|
||||
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"keyboard_folder": {"$ref": "qmk.definitions.v1#/keyboard"},
|
||||
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"keyboard_name": {"$ref": "./definitions.jsonschema#/text_identifier"},
|
||||
"keyboard_folder": {"$ref": "./definitions.jsonschema#/keyboard"},
|
||||
"maintainer": {"$ref": "./definitions.jsonschema#/text_identifier"},
|
||||
"manufacturer": {"$ref": "./definitions.jsonschema#/text_identifier"},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
@ -119,8 +119,8 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"data_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"clock_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"data_pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"clock_pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"default_brightness": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
@ -145,13 +145,13 @@
|
||||
"enum": ["dac_additive", "dac_basic", "pwm_software", "pwm_hardware"]
|
||||
},
|
||||
"macro_beep": {"type": "boolean"},
|
||||
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
|
||||
"pins": {"$ref": "./definitions.jsonschema#/mcu_pin_array"},
|
||||
"power_control": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on_state": {"$ref": "qmk.definitions.v1#/bit"},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
|
||||
"on_state": {"$ref": "./definitions.jsonschema#/bit"},
|
||||
"pin": {"$ref": "./definitions.jsonschema#/mcu_pin"}
|
||||
}
|
||||
},
|
||||
"voices": {"type": "boolean"}
|
||||
@ -171,20 +171,20 @@
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"breathing": {"type": "boolean"},
|
||||
"brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"breathing": {"type": "boolean"},
|
||||
"breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"breathing_period": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"levels": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 31
|
||||
},
|
||||
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
|
||||
"on_state": {"$ref": "qmk.definitions.v1#/bit"},
|
||||
"max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"pins": {"$ref": "./definitions.jsonschema#/mcu_pin_array"},
|
||||
"on_state": {"$ref": "./definitions.jsonschema#/bit"},
|
||||
"as_caps_lock": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
@ -269,7 +269,7 @@
|
||||
"type": "string",
|
||||
"enum": ["COL2ROW", "ROW2COL"]
|
||||
},
|
||||
"debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"debounce": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"caps_word": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@ -277,20 +277,20 @@
|
||||
"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": "./definitions.jsonschema#/unsigned_int"},
|
||||
"invert_on_shift": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"combo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"term": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"count": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"term": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"community_layouts": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/filename"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/filename"}
|
||||
},
|
||||
"dip_switch": {
|
||||
"$ref": "#/definitions/dip_switch_config",
|
||||
@ -322,8 +322,8 @@
|
||||
"type": "string",
|
||||
"enum": ["none", "custom", "embedded_flash", "legacy", "rp2040_flash", "spi_flash"]
|
||||
},
|
||||
"backing_size": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"logical_size": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"backing_size": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"logical_size": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -338,12 +338,12 @@
|
||||
"indicators": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"compose": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"kana": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"on_state": {"$ref": "qmk.definitions.v1#/bit"}
|
||||
"caps_lock": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"num_lock": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"scroll_lock": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"compose": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"kana": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"on_state": {"$ref": "./definitions.jsonschema#/bit"}
|
||||
}
|
||||
},
|
||||
"joystick": {
|
||||
@ -351,8 +351,8 @@
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"},
|
||||
"driver": {"type": "string"},
|
||||
"button_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"axis_resolution": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"button_count": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"axis_resolution": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"axes": {
|
||||
"type": "object",
|
||||
"propertyNames": {"enum": ["x", "y", "z", "rx", "ry", "rz"]},
|
||||
@ -361,10 +361,10 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"input_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"low": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"rest": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"high": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"input_pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"low": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"rest": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"high": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -376,20 +376,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
|
||||
"keycodes": {"$ref": "./definitions.jsonschema#/keycode_decl_array"},
|
||||
"layer_lock": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"layout_aliases": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
|
||||
"additionalProperties": {"$ref": "./definitions.jsonschema#/layout_macro"}
|
||||
},
|
||||
"layouts": {
|
||||
"type": "object",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/layout_macro"},
|
||||
"propertyNames": {"$ref": "./definitions.jsonschema#/layout_macro"},
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@ -404,7 +404,7 @@
|
||||
"additionalProperties": false,
|
||||
"required": ["x", "y"],
|
||||
"properties": {
|
||||
"encoder": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"encoder": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\n]*$"
|
||||
@ -418,13 +418,13 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"r": {"$ref": "qmk.definitions.v1#/signed_decimal"},
|
||||
"rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
|
||||
"ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
|
||||
"h": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"w": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"r": {"$ref": "./definitions.jsonschema#/signed_decimal"},
|
||||
"rx": {"$ref": "./definitions.jsonschema#/unsigned_decimal"},
|
||||
"ry": {"$ref": "./definitions.jsonschema#/unsigned_decimal"},
|
||||
"h": {"$ref": "./definitions.jsonschema#/key_unit"},
|
||||
"w": {"$ref": "./definitions.jsonschema#/key_unit"},
|
||||
"x": {"$ref": "./definitions.jsonschema#/key_unit"},
|
||||
"y": {"$ref": "./definitions.jsonschema#/key_unit"},
|
||||
"hand": {
|
||||
"type": "string",
|
||||
"enum": ["L", "R", "*"]
|
||||
@ -461,7 +461,7 @@
|
||||
"properties": {
|
||||
"timing": {"type": "boolean"},
|
||||
"strict_processing": {"type": "boolean"},
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"matrix_pins": {
|
||||
@ -471,14 +471,14 @@
|
||||
"custom": {"type": "boolean"},
|
||||
"custom_lite": {"type": "boolean"},
|
||||
"ghost": {"type": "boolean"},
|
||||
"input_pressed_state": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"io_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"input_pressed_state": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"io_delay": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"direct": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/mcu_pin_array"}
|
||||
},
|
||||
"cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
|
||||
"rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||
"cols": {"$ref": "./definitions.jsonschema#/mcu_pin_array"},
|
||||
"rows": {"$ref": "./definitions.jsonschema#/mcu_pin_array"}
|
||||
}
|
||||
},
|
||||
"modules": {
|
||||
@ -491,18 +491,18 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"},
|
||||
"delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"max_speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"time_to_max": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"wheel_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"delay": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"interval": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"max_speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"time_to_max": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"wheel_delay": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"oneshot": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tap_toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"tap_toggle": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"led_matrix": {
|
||||
@ -510,7 +510,7 @@
|
||||
"properties": {
|
||||
"animations": {
|
||||
"type": "object",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"propertyNames": {"$ref": "./definitions.jsonschema#/snake_case"},
|
||||
"additionalProperties": {"type": "boolean"}
|
||||
},
|
||||
"default": {
|
||||
@ -519,8 +519,8 @@
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"animation": {"type": "string"},
|
||||
"val": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
@ -546,21 +546,21 @@
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"val_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"val_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"speed_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"led_flush_limit": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"led_process_limit": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"react_on_keyup": {"type": "boolean"},
|
||||
"sleep": {"type": "boolean"},
|
||||
"split_count": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
},
|
||||
"layout": {
|
||||
"type": "array",
|
||||
@ -578,9 +578,9 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"x": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"y": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -591,7 +591,7 @@
|
||||
"properties": {
|
||||
"animations": {
|
||||
"type": "object",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"propertyNames": {"$ref": "./definitions.jsonschema#/snake_case"},
|
||||
"additionalProperties": {"type": "boolean"}
|
||||
},
|
||||
"default": {
|
||||
@ -600,10 +600,10 @@
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"animation": {"type": "string"},
|
||||
"hue": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"sat": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"val": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"hue": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"sat": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
@ -631,23 +631,23 @@
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"sat_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"val_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"hue_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"sat_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"val_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"speed_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"led_flush_limit": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"led_process_limit": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"react_on_keyup": {"type": "boolean"},
|
||||
"sleep": {"type": "boolean"},
|
||||
"split_count": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
},
|
||||
"layout": {
|
||||
"type": "array",
|
||||
@ -665,9 +665,9 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"x": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"y": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -679,27 +679,27 @@
|
||||
"properties": {
|
||||
"animations": {
|
||||
"type": "object",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"propertyNames": {"$ref": "./definitions.jsonschema#/snake_case"},
|
||||
"additionalProperties": {"type": "boolean"}
|
||||
},
|
||||
"brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"brightness_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"default": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"animation": {"type": "string"},
|
||||
"hue": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"sat": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"val": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"hue": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"sat": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["apa102", "custom", "ws2812"]
|
||||
},
|
||||
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"hue_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"layers": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@ -714,29 +714,29 @@
|
||||
"override_rgb": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_count": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"led_map": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
},
|
||||
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"pin": {
|
||||
"$ref": "qmk.definitions.v1#/mcu_pin",
|
||||
"$ref": "./definitions.jsonschema#/mcu_pin",
|
||||
"$comment": "Deprecated: use ws2812.pin instead"
|
||||
},
|
||||
"rgbw": {
|
||||
"type": "boolean",
|
||||
"$comment": "Deprecated: use ws2812.rgbw instead"
|
||||
},
|
||||
"saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"saturation_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"sleep": {"type": "boolean"},
|
||||
"split": {"type": "boolean"},
|
||||
"split_count": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -745,8 +745,8 @@
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"},
|
||||
"unlock_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"idle_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"unlock_timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"idle_timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"unlock_sequence": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
@ -780,8 +780,8 @@
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"},
|
||||
"mouse_enabled": {"type": "boolean"},
|
||||
"clock_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"data_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"clock_pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"data_pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["busywait", "interrupt", "usart", "vendor"]
|
||||
@ -818,11 +818,11 @@
|
||||
"properties": {
|
||||
"direct": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||
"items": {"$ref": "./definitions.jsonschema#/mcu_pin_array"}
|
||||
},
|
||||
"cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
|
||||
"rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
|
||||
"unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||
"cols": {"$ref": "./definitions.jsonschema#/mcu_pin_array"},
|
||||
"rows": {"$ref": "./definitions.jsonschema#/mcu_pin_array"},
|
||||
"unused": {"$ref": "./definitions.jsonschema#/mcu_pin_array"}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -849,16 +849,16 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"matrix_grid": {
|
||||
"$ref": "qmk.definitions.v1#/mcu_pin_array",
|
||||
"$ref": "./definitions.jsonschema#/mcu_pin_array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"soft_serial_pin": {
|
||||
"$ref": "qmk.definitions.v1#/mcu_pin",
|
||||
"$ref": "./definitions.jsonschema#/mcu_pin",
|
||||
"$comment": "Deprecated: use split.serial.pin instead"
|
||||
},
|
||||
"soft_serial_speed": {
|
||||
@ -874,7 +874,7 @@
|
||||
"type": "string",
|
||||
"enum": ["bitbang", "usart", "vendor"]
|
||||
},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
|
||||
"pin": {"$ref": "./definitions.jsonschema#/mcu_pin"}
|
||||
}
|
||||
},
|
||||
"transport": {
|
||||
@ -902,7 +902,7 @@
|
||||
}
|
||||
},
|
||||
"watchdog": {"type": "boolean"},
|
||||
"watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"watchdog_timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"sync_matrix_state": {
|
||||
"type": "boolean",
|
||||
"$comment": "Deprecated: use sync.matrix_state instead"
|
||||
@ -918,8 +918,8 @@
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"},
|
||||
"polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"polling_interval": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"main": {
|
||||
@ -929,7 +929,7 @@
|
||||
},
|
||||
"matrix_grid": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"items": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"$comment": "Deprecated: use split.handedness.matrix_grid instead"
|
||||
}
|
||||
}
|
||||
@ -951,9 +951,9 @@
|
||||
"permissive_hold_per_key": {"type": "boolean"},
|
||||
"retro": {"type": "boolean"},
|
||||
"retro_per_key": {"type": "boolean"},
|
||||
"term": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"term": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"term_per_key": {"type": "boolean"},
|
||||
"toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"toggle": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"usb": {
|
||||
@ -961,20 +961,20 @@
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"device_ver": {
|
||||
"$ref": "qmk.definitions.v1#/hex_number_4d",
|
||||
"$ref": "./definitions.jsonschema#/hex_number_4d",
|
||||
"$comment": "Deprecated: use device_version instead"
|
||||
},
|
||||
"device_version": {"$ref": "qmk.definitions.v1#/bcd_version"},
|
||||
"device_version": {"$ref": "./definitions.jsonschema#/bcd_version"},
|
||||
"force_nkro": {
|
||||
"type": "boolean",
|
||||
"$comment": "Deprecated: use host.default.nkro instead"
|
||||
|
||||
},
|
||||
"pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
|
||||
"vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
|
||||
"max_power": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"pid": {"$ref": "./definitions.jsonschema#/hex_number_4d"},
|
||||
"vid": {"$ref": "./definitions.jsonschema#/hex_number_4d"},
|
||||
"max_power": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"no_startup_check": {"type": "boolean"},
|
||||
"polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"polling_interval": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"shared_endpoint": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@ -983,7 +983,7 @@
|
||||
"mouse": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"suspend_wakeup_delay": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"wait_for_enumeration": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
@ -991,9 +991,9 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"keys_per_scan": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"tap_keycode_delay": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"tap_capslock_delay": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"locking": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@ -1008,10 +1008,10 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"led": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"}
|
||||
"esc_output": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"esc_input": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"led": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"speaker": {"$ref": "./definitions.jsonschema#/mcu_pin"}
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
@ -1022,10 +1022,10 @@
|
||||
"type": "string",
|
||||
"enum": ["bitbang", "custom", "i2c", "pwm", "spi", "vendor"]
|
||||
},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"rgbw": {"type": "boolean"},
|
||||
"i2c_address": {"$ref": "qmk.definitions.v1#/hex_number_2d"},
|
||||
"i2c_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
"i2c_address": {"$ref": "./definitions.jsonschema#/hex_number_2d"},
|
||||
"i2c_timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,10 +30,10 @@
|
||||
"keycodes": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"$ref": "qmk.definitions.v1#/hex_number_4d"
|
||||
"$ref": "./definitions.jsonschema#/hex_number_4d"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "object", // use 'qmk.definitions.v1#/keycode_decl' when problem keycodes are removed
|
||||
"type": "object", // use './definitions.jsonschema#/keycode_decl' when problem keycodes are removed
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
|
@ -10,10 +10,10 @@
|
||||
"minLength": 1,
|
||||
"pattern": "^[a-z][0-9a-z_]*$"
|
||||
},
|
||||
"host_language": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"keymap": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"layout": {"$ref": "qmk.definitions.v1#/layout_macro"},
|
||||
"host_language": {"$ref": "./definitions.jsonschema#/text_identifier"},
|
||||
"keyboard": {"$ref": "./definitions.jsonschema#/text_identifier"},
|
||||
"keymap": {"$ref": "./definitions.jsonschema#/text_identifier"},
|
||||
"layout": {"$ref": "./definitions.jsonschema#/layout_macro"},
|
||||
"layers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@ -55,11 +55,11 @@
|
||||
"keycodes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "qmk.definitions.v1#/text_identifier"
|
||||
"$ref": "./definitions.jsonschema#/text_identifier"
|
||||
}
|
||||
},
|
||||
"duration": {
|
||||
"$ref": "qmk.definitions.v1#/unsigned_int"
|
||||
"$ref": "./definitions.jsonschema#/unsigned_int"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -67,8 +67,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
|
||||
"config": {"$ref": "qmk.keyboard.v1"},
|
||||
"keycodes": {"$ref": "./definitions.jsonschema#/keycode_decl_array"},
|
||||
"config": {"$ref": "./keyboard.jsonschema#"},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -6,8 +6,8 @@
|
||||
"definitions": {
|
||||
"build_target": {
|
||||
"oneOf": [
|
||||
{"$ref": "qmk.definitions.v1#/keyboard_keymap_tuple"},
|
||||
{"$ref": "qmk.definitions.v1#/json_file_path"}
|
||||
{"$ref": "./definitions.jsonschema#/keyboard_keymap_tuple"},
|
||||
{"$ref": "./definitions.jsonschema#/json_file_path"}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -6,9 +6,9 @@
|
||||
"definitions": {
|
||||
"build_target": {
|
||||
"oneOf": [
|
||||
{"$ref": "qmk.definitions.v1#/keyboard_keymap_tuple"},
|
||||
{"$ref": "qmk.definitions.v1#/keyboard_keymap_env"},
|
||||
{"$ref": "qmk.definitions.v1#/json_file_path"}
|
||||
{"$ref": "./definitions.jsonschema#/keyboard_keymap_tuple"},
|
||||
{"$ref": "./definitions.jsonschema#/keyboard_keymap_env"},
|
||||
{"$ref": "./definitions.jsonschema#/json_file_path"}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -76,8 +76,13 @@ def compile_schema_store():
|
||||
if not isinstance(schema_data, dict):
|
||||
cli.log.debug('Skipping schema file %s', schema_file)
|
||||
continue
|
||||
|
||||
# `$id`-based references
|
||||
schema_store[schema_data['$id']] = schema_data
|
||||
|
||||
# Path-based references
|
||||
schema_store[Path(schema_file).name] = schema_data
|
||||
|
||||
return schema_store
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user