From ca3b062f8999f9066f651ff3e83bdc4b2bdc55bf Mon Sep 17 00:00:00 2001 From: yusing Date: Fri, 4 Oct 2024 01:00:06 +0800 Subject: [PATCH] updated schema for homepage fields --- .vscode/settings.example.json | 5 ++-- schema/providers.schema.json | 54 ++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.example.json b/.vscode/settings.example.json index bfbfaaa..849ad61 100644 --- a/.vscode/settings.example.json +++ b/.vscode/settings.example.json @@ -6,8 +6,7 @@ ], "https://github.com/yusing/go-proxy/raw/main/schema/providers.schema.json": [ "providers.example.yml", - "*.providers.yml", - "providers.yml" + "*.yml" ] } -} +} \ No newline at end of file diff --git a/schema/providers.schema.json b/schema/providers.schema.json index d3456e4..dcd4bee 100644 --- a/schema/providers.schema.json +++ b/schema/providers.schema.json @@ -64,7 +64,59 @@ "port": {}, "no_tls_verify": {}, "path_patterns": {}, - "middlewares": {} + "middlewares": {}, + "homepage": { + "title": "Dashboard config", + "type": "object", + "additionalProperties": false, + "properties": { + "show": { + "description": "Show on dashboard", + "type": "boolean", + "default": true + }, + "name": { + "description": "Display name", + "type": "string" + }, + "icon": { + "description": "Display icon", + "type": "string", + "oneOf": [ + { + "pattern": "^(png|svg)\\/[\\w\\d-_]+\\.(png|svg)$", + "description": "Icon from walkxcode/dashboard-icons", + "errorMessage": "must be png/filename.png or svg/filename.svg" + }, + { + "pattern": "^https?://", + "description": "Absolute URI" + }, + { + "pattern": "^@target/", + "description": "Relative URI to target" + } + ] + }, + "url": { + "description": "App URL override", + "type": "string", + "format": "uri" + }, + "category": { + "description": "Category", + "type": "string" + }, + "description": { + "description": "Description", + "type": "string" + }, + "widget_config": { + "description": "Widget config", + "type": "object" + } + } + } }, "additionalProperties": false, "allOf": [