From a69ab05dd687cb9aa38e0c125e4f64956c7da6c7 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 5 Nov 2022 10:30:09 +0000 Subject: Initial DD keycode migration (#18643) * Initial DD keycode migration * Sort magic keycodes --- data/schemas/keycodes.jsonschema | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 data/schemas/keycodes.jsonschema (limited to 'data/schemas/keycodes.jsonschema') diff --git a/data/schemas/keycodes.jsonschema b/data/schemas/keycodes.jsonschema new file mode 100644 index 0000000000..77a8347b3b --- /dev/null +++ b/data/schemas/keycodes.jsonschema @@ -0,0 +1,57 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "$id": "qmk.keycodes.v1", + "title": "Keycode Information", + "type": "object", + "definitions": { + "define": { + "type": "string", + "minLength": 2, + "maxLength": 50, + "pattern": "^[A-Zs_0-9]*$" + }, + "hex_number_4d": { + "type": "string", + "pattern": "^0x[0-9A-F]{4}$" + } + }, + "properties": { + "ranges": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "required": [ + "define" + ], + "properties": { + "define": {"$ref": "#/definitions/define"} + } + } + }, + "keycodes": { + "type": "object", + "propertyNames": { + "$ref": "#/definitions/hex_number_4d" + }, + "additionalProperties": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": {"$ref": "#/definitions/define"}, + "aliases": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + } +} -- cgit v1.2.3