From db60663793e8fe3e4d600ceb0862e50cdebb339f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 3 Dec 2021 10:16:47 +0000 Subject: add user permissions to JSON schema --- samples/dtail.schema.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'samples') diff --git a/samples/dtail.schema.json b/samples/dtail.schema.json index 7551449..7f5cbed 100755 --- a/samples/dtail.schema.json +++ b/samples/dtail.schema.json @@ -2,6 +2,20 @@ "$schema": "https://json-schema.org/2019-09/schema", "description": "Schema for dtail.json", "definitions": { + "userPermission": { + "type": "array", + "items": { + "type": "string" + } + }, + "userPermissions": { + "type": "object", + "patternProperties": { + "^.*$": { + "$ref": "#/definitions/userPermission" + } + } + }, "loglevel": { "type": "string", "enum": [ @@ -365,7 +379,15 @@ }, "Permissions": { "type": "object", - "properties": {} + "additionalProperties": true, + "patternProperties": { + "^Default$": { + "$ref": "#/definitions/userPermission" + }, + "^Users$": { + "$ref": "#/definitions/userPermissions" + } + } }, "Schedule": { "type": "array", -- cgit v1.2.3