rgb-cln/doc/schemas/plugin.schema.json

101 lines
2.2 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"required": [
"command"
],
"properties": {
"command": {
"type": "string",
"enum": [
"start",
"stop",
"rescan",
"startdir",
"list"
],
"description": "the subcommand this is responding to"
}
},
"allOf": [
{
"if": {
"properties": {
"command": {
"type": "string",
"enum": [
"start",
"startdir",
"rescan",
"list"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [
"command",
"plugins"
],
"properties": {
"command": {},
"plugins": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"active",
"dynamic"
],
"properties": {
"name": {
"type": "string",
"description": "full pathname of the plugin"
},
"active": {
"type": "boolean",
"description": "status; plugin completed init and is operational, plugins are configured asynchronously."
},
"dynamic": {
"type": "boolean",
"description": "plugin can be stopped or started without restarting lightningd"
}
}
}
}
}
}
},
{
"if": {
"properties": {
"command": {
"type": "string",
"enum": [
"stop"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [
"command",
"result"
],
"properties": {
"command": {},
"result": {
"type": "string",
"description": "A message saying it successfully stopped"
}
}
}
}
]
}