mpd-now-playable/schemata/config-v1.json

129 lines
2.7 KiB
JSON
Raw Permalink Normal View History

{
"$defs": {
"CocoaReceiverConfig": {
"properties": {
"kind": {
"const": "cocoa",
"default": "cocoa",
"enum": [
"cocoa"
],
"title": "Kind",
"type": "string"
}
},
"title": "CocoaReceiverConfig",
"type": "object"
},
"MpdConfig": {
"properties": {
"host": {
"default": "127.0.0.1",
"description": "The hostname or IP address of your MPD server. If you're running MPD on your local machine, you don't need to configure this.",
"format": "hostname",
"title": "Host",
"type": "string"
},
"password": {
"description": "The password required to connect to your MPD instance, if you need one.",
"format": "password",
"title": "Password",
"type": "string",
"writeOnly": true
},
"port": {
"default": 6600,
"description": "The port on which to connect to MPD. Unless you're managing multiple MPD servers on one machine for some reason, you probably haven't changed this from the default port, 6600.",
"maximum": 65535,
"minimum": 1,
"title": "Port",
"type": "integer"
}
},
"title": "MpdConfig",
"type": "object"
},
"WebsocketsReceiverConfig": {
"properties": {
"host": {
"anyOf": [
{
"format": "hostname",
"type": "string"
},
{
"items": {
"format": "hostname",
"type": "string"
},
"type": "array"
}
],
"title": "Host"
},
"kind": {
"const": "websockets",
"default": "websockets",
"enum": [
"websockets"
],
"title": "Kind",
"type": "string"
},
"port": {
"maximum": 65535,
"minimum": 1,
"title": "Port",
"type": "integer"
}
},
"required": [
"port"
],
"title": "WebsocketsReceiverConfig",
"type": "object"
}
},
"$id": "https://cdn.00dani.me/m/schemata/mpd-now-playable/config-v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"cache": {
"description": "A URL describing a cache service for mpd-now-playable to use. Supported protocols are memory://, redis://, and memcached://.",
"format": "uri",
"title": "Cache",
"type": "string"
},
"mpd": {
"$ref": "#/$defs/MpdConfig"
},
"receivers": {
"default": [
{
"kind": "cocoa"
}
],
"items": {
"discriminator": {
"mapping": {
"cocoa": "#/$defs/CocoaReceiverConfig",
"websockets": "#/$defs/WebsocketsReceiverConfig"
},
"propertyName": "kind"
},
"oneOf": [
{
"$ref": "#/$defs/CocoaReceiverConfig"
},
{
"$ref": "#/$defs/WebsocketsReceiverConfig"
}
]
},
"title": "Receivers",
"type": "array"
}
},
"title": "Config",
"type": "object"
}