doc: document that we should annotate added and deprecated schemas.

No longer just delete them!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-01-10 07:21:30 +10:30
parent 404e961bad
commit 3f8199bbfd
1 changed files with 9 additions and 0 deletions

View File

@ -10,6 +10,15 @@ use a subset of the full [JSON Schema Specification](https://json-schema.org/),
but if you find that limiting it's probably a sign that you should simplify
your JSON output.
## Updating a Schema
If you add a field, you should add it to the schema, and you must add
"added": "VERSION" (where VERSION is the next release version!).
Similarly, if you deprecate a field, add "deprecated": "VERSION" (where
VERSION is the next release version). They will be removed two versions
later.
## How to Write a Schema
Name the schema doc/schemas/`command`.schema.json: the testsuite should