From 2a4791252c47bb55482647bfa75fa53c3c7a4a37 Mon Sep 17 00:00:00 2001 From: DNin01 <106490990+DNin01@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:09:30 -0700 Subject: [PATCH 1/4] Add "any" as a valid value for `step` property --- 1/1.21.json | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/1/1.21.json b/1/1.21.json index 9a55755..34f8b7c 100644 --- a/1/1.21.json +++ b/1/1.21.json @@ -600,9 +600,26 @@ "description": "The maximum value of the decimal." }, "step": { - "type": "number", + "type": ["number", "string"], "description": "The step value of the decimal.", - "minimum": 0 + "allOf": [ + { + "if": { + "type": "number" + }, + "then": { + "minimum": 0 + } + }, + { + "if": { + "type": "string" + }, + "then": { + "required": ["any"] + } + } + ] } } } From d20db7e2d3cb4923382abf69fa6a45507dd9d97e Mon Sep 17 00:00:00 2001 From: DNin01 <106490990+DNin01@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:15:19 -0700 Subject: [PATCH 2/4] It's `enum`, right? --- 1/1.21.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1/1.21.json b/1/1.21.json index 34f8b7c..2d2e099 100644 --- a/1/1.21.json +++ b/1/1.21.json @@ -616,7 +616,7 @@ "type": "string" }, "then": { - "required": ["any"] + "enum": ["any"] } } ] From 79001d7332e0b43ab5c51897bbccdf06cb577f21 Mon Sep 17 00:00:00 2001 From: DNin01 <106490990+DNin01@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:10:12 -0700 Subject: [PATCH 3/4] Change "decimal" to "number" --- 1/1.21.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/1/1.21.json b/1/1.21.json index 2d2e099..22b2bd8 100644 --- a/1/1.21.json +++ b/1/1.21.json @@ -384,7 +384,7 @@ "type": { "type": "string", "description": "The type of the setting", - "enum": ["boolean", "positive_integer", "string", "select", "color", "integer", "untranslated", "decimal"], + "enum": ["boolean", "positive_integer", "string", "select", "color", "integer", "untranslated", "number"], "minLength": 1 }, "default": { @@ -582,7 +582,7 @@ "if": { "properties": { "type": { - "const": "decimal" + "const": "number" } } }, @@ -593,15 +593,15 @@ }, "min": { "type": "number", - "description": "The minimum value of the decimal." + "description": "The minimum value of the number." }, "max": { "type": "number", - "description": "The maximum value of the decimal." + "description": "The maximum value of the number." }, "step": { "type": ["number", "string"], - "description": "The step value of the decimal.", + "description": "The step value of the number.", "allOf": [ { "if": { From c4b05174328d7e3213a1fcffc264fed90b672da8 Mon Sep 17 00:00:00 2001 From: DNin01 <106490990+DNin01@users.noreply.github.com> Date: Tue, 7 Nov 2023 19:40:12 -0800 Subject: [PATCH 4/4] Re-add properties that were removed during merge --- 1/1.21.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1/1.21.json b/1/1.21.json index 1e85b4b..298ef63 100644 --- a/1/1.21.json +++ b/1/1.21.json @@ -388,12 +388,13 @@ "minLength": 1 }, "default": { - "type": ["boolean", "integer", "string"], + "type": ["boolean", "integer", "string", "number"], "description": "The default value of the setting." }, "potentialValues": {}, "min": {}, "max": {}, + "step": {}, "allowTransparency": {}, "if": { "$ref": "#/definitions/if"