From 8844b85531bc9edf1759cc07cda5e715842ece18 Mon Sep 17 00:00:00 2001 From: psyirius Date: Wed, 7 Aug 2024 08:11:07 -0700 Subject: [PATCH] json-schema adjustments --- schemas/config/dns.json | 3 ++- schemas/config/preset.json | 17 ++++++++--------- schemas/config/themes.json | 3 ++- schemas/config/tweaks.json | 27 ++++++++++++++++++++++++++- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/schemas/config/dns.json b/schemas/config/dns.json index 6fa17efc..fa77eed1 100644 --- a/schemas/config/dns.json +++ b/schemas/config/dns.json @@ -22,7 +22,8 @@ "format": "ipv6" } }, - "required": ["Primary", "Secondary", "Primary6", "Secondary6"] + "required": ["Primary", "Secondary", "Primary6", "Secondary6"], + "additionalProperties": false } } } diff --git a/schemas/config/preset.json b/schemas/config/preset.json index 656dc7a3..56347a2a 100644 --- a/schemas/config/preset.json +++ b/schemas/config/preset.json @@ -1,13 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "patternProperties": { - "^[a-zA-Z_][a-zA-Z0-9_]*$": { - "type": "array", - "items": { - "type": "string" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "patternProperties": { + "^[a-zA-Z_][a-zA-Z0-9_]*$": { + "type": "array", + "items": { + "type": "string" } } } - \ No newline at end of file +} diff --git a/schemas/config/themes.json b/schemas/config/themes.json index 6ff609ce..746e8040 100644 --- a/schemas/config/themes.json +++ b/schemas/config/themes.json @@ -290,7 +290,8 @@ "BorderColor", "BorderOpacity", "ShadowPulse" - ] + ], + "additionalProperties": false } } } diff --git a/schemas/config/tweaks.json b/schemas/config/tweaks.json index 133fb26c..2705dea2 100644 --- a/schemas/config/tweaks.json +++ b/schemas/config/tweaks.json @@ -1,6 +1,12 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", + "definitions": { + "toggle-state": { + "type": "string", + "enum": ["Enabled", "Disabled"] + } + }, "patternProperties": { "^[a-zA-Z_][a-zA-Z0-9_]*$": { "type": "object", @@ -77,6 +83,24 @@ "type": "string" } }, + "ScheduledTask": { + "type":"array", + "items": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "State": { + "$ref": "#/definitions/toggle-state" + }, + "OriginalState": { + "$ref": "#/definitions/toggle-state" + } + }, + "required": ["Name", "State", "OriginalState"] + } + }, "InvokeScript": { "type": "array", "items": { @@ -90,7 +114,8 @@ } } }, - "required": ["Content", "Description", "category", "panel", "Order"] + "required": ["Content", "Description", "category", "panel", "Order"], + "additionalProperties": false } } }