diff options
author | Nick Brassel <[email protected]> | 2024-08-12 22:34:22 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-12 22:34:22 +1000 |
commit | 380e0c9cad72ac29f858bef85c8b8eb35b6931f0 (patch) | |
tree | e711c1d30cb02a931db0b2a91c075dd65a38cb9f /data | |
parent | 158aaef78c26ea1ade9a5fbc0ee7fbe5b84a6fe9 (diff) | |
download | qmk_firmware-380e0c9cad72ac29f858bef85c8b8eb35b6931f0.tar.gz qmk_firmware-380e0c9cad72ac29f858bef85c8b8eb35b6931f0.zip |
Userspace: add support for adding environment variables during build (#22887)
Diffstat (limited to 'data')
-rw-r--r-- | data/schemas/definitions.jsonschema | 23 | ||||
-rw-r--r-- | data/schemas/user_repo_v1.jsonschema | 10 | ||||
-rw-r--r-- | data/schemas/user_repo_v1_1.jsonschema | 31 |
3 files changed, 57 insertions, 7 deletions
diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema index ef44915244..76ea8520ac 100644 --- a/data/schemas/definitions.jsonschema +++ b/data/schemas/definitions.jsonschema @@ -16,12 +16,6 @@ "type": "object", "additionalProperties": {"type": "boolean"} }, - "build_target": { - "oneOf": [ - {"$ref": "#/keyboard_keymap_tuple"}, - {"$ref": "#/json_file_path"} - ] - }, "filename": { "type": "string", "minLength": 1, @@ -53,6 +47,19 @@ {"$ref": "#/keyboard"}, {"$ref": "#/filename"} ], + "minItems": 2, + "maxItems": 2, + "unevaluatedItems": false + }, + "keyboard_keymap_env": { + "type": "array", + "prefixItems": [ + {"$ref": "#/keyboard"}, + {"$ref": "#/filename"}, + {"$ref": "#/kvp_object"} + ], + "minItems": 3, + "maxItems": 3, "unevaluatedItems": false }, "keycode": { @@ -87,6 +94,10 @@ "maxLength": 7, "pattern": "^[A-Z][A-Zs_0-9]*$" }, + "kvp_object": { + "type": "object", + "additionalProperties": {"type": "string"} + }, "layout_macro": { "oneOf": [ { diff --git a/data/schemas/user_repo_v1.jsonschema b/data/schemas/user_repo_v1.jsonschema index 6cdf758685..69a59bce00 100644 --- a/data/schemas/user_repo_v1.jsonschema +++ b/data/schemas/user_repo_v1.jsonschema @@ -3,6 +3,14 @@ "$id": "qmk.user_repo.v1", "title": "User Repository Information", "type": "object", + "definitions": { + "build_target": { + "oneOf": [ + {"$ref": "qmk.definitions.v1#/keyboard_keymap_tuple"}, + {"$ref": "qmk.definitions.v1#/json_file_path"} + ] + }, + }, "required": [ "userspace_version", "build_targets" @@ -15,7 +23,7 @@ "build_targets": { "type": "array", "items": { - "$ref": "qmk.definitions.v1#/build_target" + "$ref": "#/definitions/build_target" } } } diff --git a/data/schemas/user_repo_v1_1.jsonschema b/data/schemas/user_repo_v1_1.jsonschema new file mode 100644 index 0000000000..5a7ccce063 --- /dev/null +++ b/data/schemas/user_repo_v1_1.jsonschema @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "$id": "qmk.user_repo.v1_1", + "title": "User Repository Information", + "type": "object", + "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"} + ] + }, + }, + "required": [ + "userspace_version", + "build_targets" + ], + "properties": { + "userspace_version": { + "type": "string", + "enum": ["1.1"] + }, + "build_targets": { + "type": "array", + "items": { + "$ref": "#/definitions/build_target" + } + } + } +} |