From b1b3be5e22b81544e014f52994f12b842cb782d2 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sat, 2 Oct 2021 15:11:05 +0300 Subject: [PATCH] plugin configuration schemas --- syncplay/schema.json | 51 ++++++++++++++++++++++++++++++++++++++ syncplaystatus/schema.json | 31 +++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 syncplay/schema.json create mode 100644 syncplaystatus/schema.json diff --git a/syncplay/schema.json b/syncplay/schema.json new file mode 100644 index 0000000..0686b64 --- /dev/null +++ b/syncplay/schema.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://squeebot.lunasqu.ee/pkg/service-syncplay/syncplay.schema.json", + "title": "syncplay", + "description": "SyncPlay Service configuration", + "type": "object", + "properties": { + "instances": { + "type": "array", + "description": "List of all registered protocols", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Protocol's descriptive name" + }, + "syncplay": { + "object": "string", + "description": "SyncPlay configuration", + "properties": { + "name": { + "type": "string", + "description": "Display name" + }, + "host": { + "type": "string", + "description": "Server host" + }, + "port": { + "type": "integer", + "description": "Server port" + }, + "room": { + "type": "string", + "description": "Room name" + }, + "password": { + "type": "string", + "description": "Server password" + } + }, + "required": ["name", "host", "port", "room"] + } + }, + "required": ["name", "syncplay"] + } + } + }, + "required": ["instances"] +} diff --git a/syncplaystatus/schema.json b/syncplaystatus/schema.json new file mode 100644 index 0000000..6fb3a89 --- /dev/null +++ b/syncplaystatus/schema.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://squeebot.lunasqu.ee/pkg/service-syncplay/syncplaystatus.schema.json", + "title": "syncplaystatus", + "description": "SyncPlay Status monitors", + "type": "object", + "properties": { + "monitors": { + "type": "array", + "description": "List of monitors", + "items": { + "type": "object", + "properties": { + "rooms": { + "type": "array", + "description": "Rooms which are used for monitoring", + "items": { + "type": "string" + } + }, + "protocol": { + "type": "string", + "description": "Name of the syncplay protocol instance to monitor" + } + }, + "required": ["rooms", "protocol"] + } + } + }, + "required": ["monitors"] +}