JsonConfig: update JSON schema

This commit is contained in:
Carter Li
2023-06-18 02:07:34 +08:00
parent 594765658a
commit d508dc69dc
+29 -29
View File
@@ -1,6 +1,13 @@
{
"$schema": "http://json-schema.org/schema",
"$defs": {
"colors": {
"type": "string",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
}
},
"type": "object",
"title": "JSON config file for fastfetch",
"properties": {
"logo": {
"title": "Fastfetch logo configurations",
@@ -33,49 +40,40 @@
"title": "Overwrite a color in the logo",
"properties": {
"1": {
"type": "string",
"title": "Color 1",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"2": {
"type": "string",
"title": "Color 2",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"3": {
"type": "string",
"title": "Color 3",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"4": {
"type": "string",
"title": "Color 4",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"5": {
"type": "string",
"title": "Color 5",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"6": {
"type": "string",
"title": "Color 6",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"7": {
"type": "string",
"title": "Color 7",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"8": {
"type": "string",
"title": "Color 8",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"9": {
"type": "string",
"title": "Color 9",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
}
}
},
@@ -235,21 +233,19 @@
"title": "Set the color of the keys and title",
"anyOf": [
{
"type": "string",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"title": "Set the both color of the keys and title",
"$ref": "#/$defs/colors"
},
{
"type": "object",
"properties": {
"keys": {
"type": "string",
"title": "Set the color of the keys",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
},
"title": {
"type": "string",
"title": "Set the color of the title",
"enum": ["reset_", "bright_", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]
"$ref": "#/$defs/colors"
}
}
}
@@ -427,10 +423,10 @@
{
"properties": {
"type": {
"enum": ["break", "Colors"],
"additionalProperties": false
"enum": ["Break", "Colors"]
}
}
},
"additionalProperties": false
},
{
"properties": {
@@ -457,9 +453,11 @@
]
},
"key": {
"title": "Key of the module",
"type": "string"
},
"format": {
"title": "Format of the module",
"type": "string"
}
},
@@ -633,7 +631,8 @@
"format": {
"type": "string"
}
}
},
"additionalProperties": false
},
{
"properties": {
@@ -723,7 +722,8 @@
"format": {
"type": "string"
}
}
},
"additionalProperties": false
}
]
}