From aea64f3ae0c7f0704306f7caf1a8ca42401f509c Mon Sep 17 00:00:00 2001 From: Jack Scott <37879896+JackScott7@users.noreply.github.com> Date: Mon, 19 Aug 2024 12:16:02 +0330 Subject: [PATCH 1/2] Create schema.json --- schema.json | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 schema.json diff --git a/schema.json b/schema.json new file mode 100644 index 0000000..30a95ea --- /dev/null +++ b/schema.json @@ -0,0 +1,64 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "macros": { + "type": "object", + "properties": { + "word": { + "type": "object", + "patternProperties": { + "^!.*$": { "type": "string" } + }, + "additionalProperties": true + }, + "action": { + "type": "object", + "properties": { + "#cb": { "type": "string" } + }, + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "macro_settings": { + "type": "object", + "properties": { + "shuffle": { + "type": "object", + "properties": { + "enabled": { "type": "string", "enum": ["true", "false"] }, + "shuffle_macros": { + "type": "array", + "items": { "type": "string" } + } + }, + "required": ["enabled", "shuffle_macros"], + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "extension_setting": { + "type": "object", + "properties": { + "enabled": { "type": "string", "enum": ["true", "false"] }, + "extensions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { "type": "string", "enum": ["print", "action"] } + }, + "additionalProperties": { "type": "string" } + } + } + }, + "required": ["enabled", "extensions"], + "additionalProperties": false + } + }, + "required": ["macros", "macro_settings", "extension_setting"], + "additionalProperties": false +} From 80bf7b93318b9666ef89913d995e7aa0f96a1169 Mon Sep 17 00:00:00 2001 From: Jack Scott <37879896+JackScott7@users.noreply.github.com> Date: Tue, 5 Nov 2024 01:02:19 +0330 Subject: [PATCH 2/2] Update schema.json --- schema.json | 170 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 116 insertions(+), 54 deletions(-) diff --git a/schema.json b/schema.json index 30a95ea..595f7b8 100644 --- a/schema.json +++ b/schema.json @@ -1,64 +1,126 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "macros": { - "type": "object", - "properties": { - "word": { - "type": "object", - "patternProperties": { - "^!.*$": { "type": "string" } - }, - "additionalProperties": true - }, - "action": { - "type": "object", - "properties": { - "#cb": { "type": "string" } - }, - "additionalProperties": true - } - }, - "additionalProperties": false + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "macros": { + "type": "object", + "properties": { + "word": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "macro_settings": { - "type": "object", - "properties": { - "shuffle": { - "type": "object", - "properties": { - "enabled": { "type": "string", "enum": ["true", "false"] }, - "shuffle_macros": { - "type": "array", - "items": { "type": "string" } - } - }, - "required": ["enabled", "shuffle_macros"], - "additionalProperties": false - } + "action": { + "type": "object", + "properties": { + "#ite": { + "type": "string" }, - "additionalProperties": false + "#cb": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "#ite", + "#cb" + ] + } + }, + "required": [ + "word", + "action" + ] + }, + "macro_settings": { + "type": "object", + "properties": { + "shuffle": { + "type": "object", + "properties": { + "enabled": { + "type": "string", + "enum": [ + "true", + "false" + ] + }, + "shuffle_macros": { + "type": "array", + "items": { + "type": "string", + "pattern": "^![a-zA-Z0-9]+$" + } + } + }, + "required": [ + "enabled", + "shuffle_macros" + ] + } + }, + "required": [ + "shuffle" + ] + }, + "extension_settings": { + "type": "object", + "properties": { + "enabled": { + "type": "string", + "enum": [ + "true", + "false" + ] }, - "extension_setting": { + "extensions": { + "type": "array", + "items": { "type": "object", "properties": { - "enabled": { "type": "string", "enum": ["true", "false"] }, - "extensions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { "type": "string", "enum": ["print", "action"] } - }, - "additionalProperties": { "type": "string" } - } + "type": { + "type": "string", + "enum": [ + "print", + "action" + ] + }, + "cmd": { + "type": "string" + }, + "args": { + "type": "array", + "items": { + "type": "string" } + } + }, + "patternProperties": { + "^@": { + "type": "string" + } }, - "required": ["enabled", "extensions"], - "additionalProperties": false + "required": [ + "type", + "cmd", + "args" + ] + } } - }, - "required": ["macros", "macro_settings", "extension_setting"], - "additionalProperties": false + }, + "required": [ + "enabled", + "extensions" + ] + } + }, + "required": [ + "macros", + "macro_settings", + "extension_settings" + ], + "additionalProperties": false }