This commit is contained in:
Zach White 2021-06-21 09:58:11 -07:00
parent 243fc17e41
commit 846da06380
2 changed files with 22 additions and 99 deletions

View file

@ -64,6 +64,19 @@
} }
] ]
}, },
"signed_decimal": {
"type": "number"
},
"signed_int": {
"type": "number",
"multipleOf": 1
}
"signed_int_8": {
"type": "number",
"min": -127,
"max": 127,
"multipleOf": 1
}
"string_array": { "string_array": {
"type": "array", "type": "array",
"items": { "items": {
@ -80,12 +93,12 @@
"type": "number", "type": "number",
"min": 0 "min": 0
}, },
"unsigned_integer": { "unsigned_int": {
"type": "number", "type": "number",
"min": 0, "min": 0,
"multipleOf": 1 "multipleOf": 1
} }
"unsigned_integer_8": { "unsigned_int_8": {
"type": "number", "type": "number",
"min": 0, "min": 0,
"max": 255, "max": 255,

View file

@ -3,96 +3,6 @@
"$id": "qmk.keyboard.v1", "$id": "qmk.keyboard.v1",
"title": "Keyboard Information", "title": "Keyboard Information",
"type": "object", "type": "object",
"definitions": {
"boolean_array": {
"type": "object",
"additionalProperties": {"type": "boolean"}
},
"filename": {
"type": "string",
"minLength": 1,
"pattern": "^[0-9a-z_]*$"
},
"hex_number_2d": {
"type": "string",
"pattern": "^0x[0-9A-F]{2}$"
},
"hex_number_4d": {
"type": "string",
"pattern": "^0x[0-9A-F]{4}$"
},
"text_identifier": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"layout_macro": {
"oneOf": [
{
"type": "string",
"enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
},
{
"type": "string",
"pattern": "^LAYOUT_[0-9a-z_]*$"
}
]
},
"key_unit": {
"type": "number",
"min": 0.25
},
"mcu_pin_array": {
"type": "array",
"items": {"$ref": "qmk.definitions.v1#/mcu_pin"}
},
"mcu_pin": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "string",
"pattern": "^LINE_PIN\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
},
"string_array": {
"type": "array",
"items": {
"type": "string"
}
},
"string_object": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"unsigned_decimal": {
"type": "number",
"min": 0
},
"unsigned_integer": {
"type": "number",
"min": 0,
"multipleOf": 1
}
"unsigned_integer_8": {
"type": "number",
"min": 0,
"max": 255,
"multipleOf": 1
}
}
"properties": { "properties": {
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"}, "maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
@ -118,7 +28,7 @@
"type": "string", "type": "string",
"enum": ["COL2ROW", "ROW2COL"] "enum": ["COL2ROW", "ROW2COL"]
}, },
"debounce": {"$ref": "qmk.definitions.v1#/unsigned_integer"}, "debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"height": {"$ref": "qmk.definitions.v1#/key_unit"}, "height": {"$ref": "qmk.definitions.v1#/key_unit"},
"width": {"$ref": "qmk.definitions.v1#/key_unit"}, "width": {"$ref": "qmk.definitions.v1#/key_unit"},
"community_layouts": { "community_layouts": {
@ -204,19 +114,19 @@
"type": "boolean" "type": "boolean"
} }
}, },
"brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_integer"}, "brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_integer"}, "hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_integer"}, "led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_integer_8"}, "max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_integer"}, "saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"sleep": {"type": "boolean"}, "sleep": {"type": "boolean"},
"split": {"type": "boolean"}, "split": {"type": "boolean"},
"split_count": { "split_count": {
"type": "array", "type": "array",
"minLength": 2, "minLength": 2,
"maxLength": 2, "maxLength": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_integer"} "items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
} }
} }
}, },