2022-07-16 15:18:27 +02:00
|
|
|
{
|
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": false,
|
|
|
|
"required": [],
|
|
|
|
"properties": {
|
|
|
|
"rune": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "optional rune to add to"
|
|
|
|
},
|
|
|
|
"restrictions": {
|
|
|
|
"oneOf": [
|
|
|
|
{
|
|
|
|
"type": "array",
|
|
|
|
"description": "array of restrictions to add to rune",
|
|
|
|
"items": {
|
commando: make rune alternatives a JSON array.
This avoids having to escape | or &, though we still allow that for
the deprecation period.
To detect deprecated usage, we insist that alternatives are *always*
an array (which could be loosened later), but that also means that
restrictions must *always* be an array for now.
Before:
```
# invoice, description either A or B
lightning-cli commando-rune '["method=invoice","pnamedescription=A|pnamedescription=B"]'
# invoice, description literally 'A|B'
lightning-cli commando-rune '["method=invoice","pnamedescription=A\\|B"]'
```
After:
```
# invoice, description either A or B
lightning-cli commando-rune '[["method=invoice"],["pnamedescription=A", "pnamedescription=B"]]'
# invoice, description literally 'A|B'
lightning-cli commando-rune '[["method=invoice"],["pnamedescription=A|B"]]'
```
Changelog-Deprecated: JSON-RPC: `commando-rune` restrictions is always an array, each element an array of alternatives. Replaces a string with `|`-separators, so no escaping necessary except for `\\`.
2022-09-14 07:30:26 +02:00
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2022-07-16 15:18:27 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
commando: make rune alternatives a JSON array.
This avoids having to escape | or &, though we still allow that for
the deprecation period.
To detect deprecated usage, we insist that alternatives are *always*
an array (which could be loosened later), but that also means that
restrictions must *always* be an array for now.
Before:
```
# invoice, description either A or B
lightning-cli commando-rune '["method=invoice","pnamedescription=A|pnamedescription=B"]'
# invoice, description literally 'A|B'
lightning-cli commando-rune '["method=invoice","pnamedescription=A\\|B"]'
```
After:
```
# invoice, description either A or B
lightning-cli commando-rune '[["method=invoice"],["pnamedescription=A", "pnamedescription=B"]]'
# invoice, description literally 'A|B'
lightning-cli commando-rune '[["method=invoice"],["pnamedescription=A|B"]]'
```
Changelog-Deprecated: JSON-RPC: `commando-rune` restrictions is always an array, each element an array of alternatives. Replaces a string with `|`-separators, so no escaping necessary except for `\\`.
2022-09-14 07:30:26 +02:00
|
|
|
"enum": [
|
|
|
|
"readonly"
|
|
|
|
],
|
|
|
|
"description": "readonly string to indicate standard readonly restrictions."
|
2022-07-16 15:18:27 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|