json-schema adjustments

This commit is contained in:
psyirius 2024-08-07 08:11:07 -07:00
parent 5e2acadee5
commit 8844b85531
4 changed files with 38 additions and 12 deletions

View File

@ -22,7 +22,8 @@
"format": "ipv6" "format": "ipv6"
} }
}, },
"required": ["Primary", "Secondary", "Primary6", "Secondary6"] "required": ["Primary", "Secondary", "Primary6", "Secondary6"],
"additionalProperties": false
} }
} }
} }

View File

@ -1,13 +1,12 @@
{ {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object", "type": "object",
"patternProperties": { "patternProperties": {
"^[a-zA-Z_][a-zA-Z0-9_]*$": { "^[a-zA-Z_][a-zA-Z0-9_]*$": {
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
}
} }
} }
} }
}

View File

@ -290,7 +290,8 @@
"BorderColor", "BorderColor",
"BorderOpacity", "BorderOpacity",
"ShadowPulse" "ShadowPulse"
] ],
"additionalProperties": false
} }
} }
} }

View File

@ -1,6 +1,12 @@
{ {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object", "type": "object",
"definitions": {
"toggle-state": {
"type": "string",
"enum": ["Enabled", "Disabled"]
}
},
"patternProperties": { "patternProperties": {
"^[a-zA-Z_][a-zA-Z0-9_]*$": { "^[a-zA-Z_][a-zA-Z0-9_]*$": {
"type": "object", "type": "object",
@ -77,6 +83,24 @@
"type": "string" "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": { "InvokeScript": {
"type": "array", "type": "array",
"items": { "items": {
@ -90,7 +114,8 @@
} }
} }
}, },
"required": ["Content", "Description", "category", "panel", "Order"] "required": ["Content", "Description", "category", "panel", "Order"],
"additionalProperties": false
} }
} }
} }