From 07a05621e73cc4e74c1adc57d4acfac82d48ab90 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sat, 2 Oct 2021 15:10:48 +0300 Subject: [PATCH] plugin configuration schemas --- irc/schema.json | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 irc/schema.json diff --git a/irc/schema.json b/irc/schema.json new file mode 100644 index 0000000..f078c19 --- /dev/null +++ b/irc/schema.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://squeebot.lunasqu.ee/pkg/service-irc/irc.schema.json", + "title": "IRC Configuration", + "description": "IRC 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" + }, + "irc": { + "type": "object", + "description": "IRC connection options", + "properties": { + "nick": { + "type": "string", + "description": "Nickname" + }, + "host": { + "type": "string", + "description": "Server host" + }, + "port": { + "type": "integer", + "description": "Server port" + }, + "sasl": { + "type": "boolean", + "description": "Use SASL authentication" + }, + "ssl": { + "type": "boolean", + "description": "Use a secure connection" + }, + "channels": { + "type": "array", + "description": "Channels to automatically join", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "nickserv": { + "type": "object", + "description": "NickServ configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable NickServ user authorization" + }, + "command": { + "type": "string", + "description": "NickServ command used for authorization" + } + } + }, + "username": { + "type": "string", + "description": "Username displayed in WHOIS" + }, + "password": { + "type": "string", + "description": "Server or SASL password" + } + }, + "required": ["nick", "host", "port"] + } + }, + "required": ["name", "irc"] + } + } + }, + "required": ["instances"] +}