diff --git a/schema.json b/schema.json new file mode 100644 index 0000000..595f7b8 --- /dev/null +++ b/schema.json @@ -0,0 +1,126 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "macros": { + "type": "object", + "properties": { + "word": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "action": { + "type": "object", + "properties": { + "#ite": { + "type": "string" + }, + "#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" + ] + }, + "extensions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "print", + "action" + ] + }, + "cmd": { + "type": "string" + }, + "args": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "patternProperties": { + "^@": { + "type": "string" + } + }, + "required": [ + "type", + "cmd", + "args" + ] + } + } + }, + "required": [ + "enabled", + "extensions" + ] + } + }, + "required": [ + "macros", + "macro_settings", + "extension_settings" + ], + "additionalProperties": false +}