From a90e1d7ccf69c6062b259203866ef906d6eef180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 23 Jul 2025 09:30:59 +0800 Subject: [PATCH] JsonSchema: improve definitions of `colors` and `conditions` [ci skip] Fix #1862 --- doc/json_schema.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/json_schema.json b/doc/json_schema.json index b5e86a82d..2ed77d22c 100644 --- a/doc/json_schema.json +++ b/doc/json_schema.json @@ -3,7 +3,8 @@ "$defs": { "colors": { "type": "string", - "enum": [ + "description": "https://github.com/fastfetch-cli/fastfetch/wiki/Color-Format-Specification", + "examples": [ "reset_", "bright_", "dim_", "italic_", "underline_", "blink_", "inverse_", "hidden_", "strike_", "light_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "default" ] @@ -52,6 +53,7 @@ "bar-monochrome" ] }, + "uniqueItems": true, "default": [ "num", "num-color" @@ -150,13 +152,13 @@ "properties": { "system": { "description": "System name to match", - "type": "string", "oneOf": [ { "$ref": "#/$defs/systems" }, { "type": "array", + "uniqueItems": true, "items": { "$ref": "#/$defs/systems" }, @@ -170,13 +172,13 @@ }, "!system": { "description": "System name to not match", - "type": "string", "oneOf": [ { "$ref": "#/$defs/systems" }, { "type": "array", + "uniqueItems": true, "items": { "$ref": "#/$defs/systems" }, @@ -190,13 +192,13 @@ }, "arch": { "description": "Architecture to match", - "type": "string", "oneOf": [ { "$ref": "#/$defs/architectures" }, { "type": "array", + "uniqueItems": true, "items": { "$ref": "#/$defs/architectures" }, @@ -210,13 +212,13 @@ }, "!arch": { "description": "Architecture to not match", - "type": "string", "oneOf": [ { "$ref": "#/$defs/architectures" }, { "type": "array", + "uniqueItems": true, "items": { "$ref": "#/$defs/architectures" },