core-lightning/doc/schemas/datastore.schema.json
Rusty Russell fe86c117d9 datastore: turn keys into arrays
After some discussion with @shesek, and my own usage, we agreed that
a more comprehensive interface, which explicitly supports grouping,
is desirable.

Thus keys are now arrays, with the semantic that a key is either a
parent or has a value, never both.

For convenience in the JSON schema, we always return them as arrays,
though we accept simple strings as arguments.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-08-25 10:06:31 +02:00

28 lines
715 B
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [ "key" ],
"properties": {
"key": {
"type": "array",
"items": {
"type": "string",
"description": "Part of the key added to the datastore"
}
},
"generation": {
"type": "u64",
"description": "The number of times this has been updated"
},
"hex": {
"type": "hex",
"description": "The hex data which has been added to the datastore"
},
"string": {
"type": "string",
"description": "The data as a string, if it's valid utf-8"
}
}
}