summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-12-04 12:04:09 +1100
committerGitHub <noreply@github.com>2023-12-04 12:04:09 +1100
commit33ff722ec8ea4808ce9dc6fe8bb6b150fbdf0d3b (patch)
treed27131be290d4c872fa5f1564cfa4fecc83c8e01 /data
parent8895b135833b91efd987ac32e46d4c6e1f918b77 (diff)
Sort definitions.jsonschema (#22588)
Diffstat (limited to 'data')
-rw-r--r--data/schemas/definitions.jsonschema162
1 files changed, 77 insertions, 85 deletions
diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema
index ea29343d0a..a1fdd2dcc6 100644
--- a/data/schemas/definitions.jsonschema
+++ b/data/schemas/definitions.jsonschema
@@ -3,10 +3,25 @@
"$id": "qmk.definitions.v1",
"title": "Common definitions used across QMK's jsonschemas.",
"type": "object",
+ "bcd_version": {
+ "type": "string",
+ "pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
+ },
+ "bit": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1
+ },
"boolean_array": {
"type": "object",
"additionalProperties": {"type": "boolean"}
},
+ "build_target": {
+ "oneOf": [
+ {"$ref": "#/keyboard_keymap_tuple"},
+ {"$ref": "#/json_file_path"}
+ ]
+ },
"filename": {
"type": "string",
"minLength": 1,
@@ -20,18 +35,56 @@
"type": "string",
"pattern": "^0x[0-9A-F]{4}$"
},
- "bcd_version": {
+ "json_file_path": {
"type": "string",
- "pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
+ "pattern": "^[0-9a-z_/\\-]+\\.json$"
},
- "text_identifier": {
+ "key_unit": {
+ "type": "number"
+ },
+ "keyboard": {
"type": "string",
- "minLength": 1,
- "maxLength": 250
+ "pattern": "^[0-9a-z][0-9a-z_/]*$"
},
- "snake_case": {
+ "keyboard_keymap_tuple": {
+ "type": "array",
+ "prefixItems": [
+ {"$ref": "#/keyboard"},
+ {"$ref": "#/filename"}
+ ],
+ "unevaluatedItems": false
+ },
+ "keycode": {
"type": "string",
- "pattern": "^[a-z][a-z0-9_]*$"
+ "minLength": 2,
+ "maxLength": 50,
+ "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"}
+ },
+ "keycode_short": {
+ "type": "string",
+ "minLength": 2,
+ "maxLength": 7,
+ "pattern": "^[A-Z][A-Zs_0-9]*$"
},
"layout_macro": {
"oneOf": [
@@ -68,49 +121,6 @@
}
]
},
- "key_unit": {
- "type": "number"
- },
- "keyboard": {
- "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"}
- },
"mcu_pin": {
"oneOf": [
{
@@ -129,14 +139,14 @@
"type": "string",
"pattern": "^GP\\d{1,2}$"
},
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
+ {"type": "integer"},
+ {"type": "null"}
]
},
+ "mcu_pin_array": {
+ "type": "array",
+ "items": {"$ref": "#/mcu_pin"}
+ },
"signed_decimal": {
"type": "number"
},
@@ -148,17 +158,22 @@
"minimum": -127,
"maximum": 127
},
+ "snake_case": {
+ "type": "string",
+ "pattern": "^[a-z][a-z0-9_]*$"
+ },
"string_array": {
"type": "array",
- "items": {
- "type": "string"
- }
+ "items": {"type": "string"}
},
"string_object": {
"type": "object",
- "additionalProperties": {
- "type": "string"
- }
+ "additionalProperties": {"type": "string"}
+ },
+ "text_identifier": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 250
},
"unsigned_decimal": {
"type": "number",
@@ -172,28 +187,5 @@
"type": "integer",
"minimum": 0,
"maximum": 255
- },
- "bit": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1
- },
- "keyboard_keymap_tuple": {
- "type": "array",
- "prefixItems": [
- { "$ref": "#/keyboard" },
- { "$ref": "#/filename" }
- ],
- "unevaluatedItems": false
- },
- "json_file_path": {
- "type": "string",
- "pattern": "^[0-9a-z_/\\-]+\\.json$"
- },
- "build_target": {
- "oneOf": [
- { "$ref": "#/keyboard_keymap_tuple" },
- { "$ref": "#/json_file_path" }
- ]
}
}