From 6fedea17ece936591a8eb09c7c503cd999ee3e34 Mon Sep 17 00:00:00 2001 From: psyirius Date: Wed, 7 Aug 2024 07:56:15 -0700 Subject: [PATCH] added json-schema for config/tweaks.json --- config/tweaks.json | 1 + schemas/config/tweaks.json | 96 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 schemas/config/tweaks.json diff --git a/config/tweaks.json b/config/tweaks.json index fcd0f307..94b2b63e 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -1,4 +1,5 @@ { + "$schema": "../schemas/config/tweaks.json", "WPFTweaksAH": { "Content": "Disable Activity History", "Description": "This erases recent docs, clipboard, and run history.", diff --git a/schemas/config/tweaks.json b/schemas/config/tweaks.json new file mode 100644 index 00000000..133fb26c --- /dev/null +++ b/schemas/config/tweaks.json @@ -0,0 +1,96 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "patternProperties": { + "^[a-zA-Z_][a-zA-Z0-9_]*$": { + "type": "object", + "properties": { + "Content": { + "type": "string" + }, + "Description": { + "type": "string" + }, + "category": { + "type": "string", + "enum": [ + "Essential Tweaks", + "Performance Plans", + "Customize Preferences", + "z__Advanced Tweaks - CAUTION", + "Shortcuts" + ] + }, + "panel": { + "type": "string", + "pattern": "^\\d+$" + }, + "Order": { + "type": "string", + "pattern": "^[0-9a-f]+_$" + }, + "registry": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Path": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Value": { + "type": "string" + }, + "OriginalValue": { + "type": "string" + } + }, + "required": ["Path", "Name", "Type", "Value", "OriginalValue"] + } + }, + "service": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "StartupType": { + "type": "string" + }, + "OriginalType": { + "type": "string" + } + }, + "required": ["Name", "StartupType", "OriginalType"] + } + }, + "appx": { + "type": "array", + "items": { + "type": "string" + } + }, + "InvokeScript": { + "type": "array", + "items": { + "type": "string" + } + }, + "UndoScript": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["Content", "Description", "category", "panel", "Order"] + } + } +}