core-lightning/doc/schemas
Rusty Russell 25b4249f54 doc: fix decode schema for bolt11 routehints.
I decode a routehint in the next patch, and it barfed:

```
>       assert only_one(l1.rpc.decode(inv['bolt11'])['routes'])['short_channel_id'] == alias23

tests/test_opening.py:1515: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
contrib/pyln-client/pyln/client/lightning.py:321: in wrapper
    return self.call(name, payload=args)
contrib/pyln-testing/pyln/testing/utils.py:691: in call
    schemas[1].validate(res)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = Validator(schema={'$schema': 'http://json-...ft-07/schema#', 'allOf': [{'if': {'properties': {'type': {'enum': [...], ...iption': 'if this is f... diagnostics!', 'type': 'boolean'}}, 'required': ['type', 'valid'], ...}, format_checker=None)
args = ({'amount_msat': 10msat, 'created_at': 1659923931, 'currency': 'bcrt', 'description': 'desc', ...},), kwargs = {}
error = <ValidationError: "1msat is not of type 'u32'">

    def validate(self, *args, **kwargs):
        for error in self.iter_errors(*args, **kwargs):
>           raise error
E           jsonschema.exceptions.ValidationError: 1msat is not of type 'u32'
E           
E           Failed validating 'type' in schema['allOf'][6]['then']['properties']['routes']['items']['items']['properties']['fee_base_msat']:
E               {'description': 'the base fee for payments', 'type': 'u32'}
E           
E           On instance['routes'][0][0]['fee_base_msat']:
E               1msat

```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-08-09 16:31:36 -05:00
..
addgossip.request.json json-rpc: Add request stubs for a couple of calls 2022-02-11 16:02:25 +01:00
addgossip.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
autocleaninvoice.request.json json-rpc: Add request stubs for a couple of calls 2022-02-11 16:02:25 +01:00
autocleaninvoice.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
bkpr-channelsapy.schema.json bkpr: add docs, change names to 'bkpr-*' 2022-07-28 12:08:18 +09:30
bkpr-dumpincomecsv.schema.json bkpr: add docs, change names to 'bkpr-*' 2022-07-28 12:08:18 +09:30
bkpr-inspect.schema.json bkpr: add docs, change names to 'bkpr-*' 2022-07-28 12:08:18 +09:30
bkpr-listaccountevents.schema.json bkpr: track channel rebalances, display in listincome 2022-08-09 11:57:18 +09:30
bkpr-listbalances.schema.json bkpr: add docs, change names to 'bkpr-*' 2022-07-28 12:08:18 +09:30
bkpr-listincome.schema.json bkpr: save invoice description data to the database and display it 2022-07-28 12:08:18 +09:30
check.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
checkmessage.request.json json-rpc: Add request stubs for a couple of calls 2022-02-11 16:02:25 +01:00
checkmessage.schema.json rpc: improve error format 2022-07-19 17:55:31 +02:00
close.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
close.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
commando-rune.request.json doc: document commando and commando-rune. 2022-07-17 08:51:02 +09:30
commando-rune.schema.json commando-rune: show warning when creating runes with no restrictions 2022-07-29 08:46:14 -07:00
commando.request.json commando: add support for parameters by array, parameter count. 2022-07-17 08:51:02 +09:30
connect.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
connect.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
createinvoice.request.json cln-rpc: Add invoice RPC methods 2022-04-02 09:46:01 +10:30
createinvoice.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
createonion.request.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
createonion.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
datastore.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
datastore.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
decode.schema.json doc: fix decode schema for bolt11 routehints. 2022-08-09 16:31:36 -05:00
decodepay.schema.json pyln-client: convert every _msat field to Millisatoshi 2022-06-21 06:52:35 +09:30
deldatastore.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
deldatastore.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
delexpiredinvoice.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
delexpiredinvoice.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
delinvoice.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
delinvoice.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
delpay.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
disableoffer.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
disconnect.request.json cln-rpc: Yet more RPC methods being mapped 2022-04-02 09:46:01 +10:30
disconnect.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
emergencyrecover.request.json doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
emergencyrecover.schema.json doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
feerates.request.json cln-rpc: Yet more RPC methods being mapped 2022-04-02 09:46:01 +10:30
feerates.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
fetchinvoice.schema.json fetchinvoice: amount_msat not msat. 2022-06-21 06:52:35 +09:30
fundchannel_cancel.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
fundchannel_complete.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
fundchannel_start.schema.json jsonrpc: Add mindepth argument to fundchannel and multifundchannel 2022-07-04 22:14:06 +02:00
fundchannel.request.json schema: Add missing mindepth argument to fundchannel 2022-07-21 14:19:06 +09:30
fundchannel.schema.json jsonrpc: Add mindepth argument to fundchannel and multifundchannel 2022-07-04 22:14:06 +02:00
funderupdate.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
fundpsbt.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
fundpsbt.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
getinfo.request.json json-rpc: Add request stubs for a couple of calls 2022-02-11 16:02:25 +01:00
getinfo.schema.json doc: fix getinfo non-ASCII chars for older mrkd. 2022-04-25 21:03:22 +09:30
getlog.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
getroute.request.json lightningd: change msatoshi args to amount_msat. 2022-06-21 06:52:35 +09:30
getroute.schema.json lightningd: allow 'style' 'legacy' for clboss compat (with deprecated_apis). 2022-03-24 13:19:10 +10:30
help.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
invoice.request.json lightningd: change msatoshi args to amount_msat. 2022-06-21 06:52:35 +09:30
invoice.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
keysend.request.json lightningd: change msatoshi args to amount_msat. 2022-06-21 06:52:35 +09:30
keysend.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
listchannels.request.json json-rpc: Add request stubs for a couple of calls 2022-02-11 16:02:25 +01:00
listchannels.schema.json doc/schemas: disallow unknown fields in listchannels. 2022-02-08 12:06:16 +01:00
listconfigs.schema.json bkpr: Add an option to set the database to something else (postgres) 2022-07-28 12:08:18 +09:30
listdatastore.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
listdatastore.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
listforwards.request.json cln-rpc: Yet more RPC methods being mapped 2022-04-02 09:46:01 +10:30
listforwards.schema.json lightningd: save outgoing information for more forwards. 2022-07-12 06:38:11 +09:30
listfunds.request.json json-rpc: Add request stubs for a couple of calls 2022-02-11 16:02:25 +01:00
listfunds.schema.json JSON: don't print deprecated amount fields any more 2022-06-21 06:52:35 +09:30
listinvoices.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
listinvoices.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
listnodes.request.json doc: set additionalProperties to false in all request schemas. 2022-04-02 09:46:01 +10:30
listnodes.schema.json bolt7: allow announcement of ADDR_TYPE_DNS 2021-11-30 09:38:17 +10:30
listoffers.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
listpays.request.json cln-rpc: Yet more RPC methods being mapped 2022-04-02 09:46:01 +10:30
listpays.schema.json pay/sendpay: also store description in case bolt11 uses description_hash. 2022-04-04 20:26:04 +09:30
listpeers.request.json json-rpc: Add request stubs for a couple of calls 2022-02-11 16:02:25 +01:00
listpeers.schema.json bkpr/listpeeers: add lease_fees back to funds; separate out in listpeers 2022-07-31 21:53:05 +09:30
listsendpays.request.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
listsendpays.schema.json pay/sendpay: also store description in case bolt11 uses description_hash. 2022-04-04 20:26:04 +09:30
listtransactions.request.json grpc: Map sendonion and createonion 2022-04-02 09:46:01 +10:30
listtransactions.schema.json json: fix up msat amounts in non-_msat fields. 2022-06-21 06:52:35 +09:30
makesecret.request.json makesecret: change info_hex arg to simply "hex" to match datastore command. 2022-07-15 22:17:58 +09:30
makesecret.schema.json doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
multifundchannel.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
multiwithdraw.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
newaddr.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
newaddr.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
notifications.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
offer.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
offerout.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
openchannel_abort.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
openchannel_bump.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
openchannel_init.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
openchannel_signed.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
openchannel_update.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
parsefeerate.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
pay.request.json lightningd: change msatoshi args to amount_msat. 2022-06-21 06:52:35 +09:30
pay.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
ping.request.json cln-rpc: Yet more RPC methods being mapped 2022-04-02 09:46:01 +10:30
ping.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
plugin.schema.json json: add "dynamic" field to plugin list 2022-07-10 21:09:41 -05:00
recoverchannel.request.json doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
recoverchannel.schema.json doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
reserveinputs.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
sendcustommsg.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
sendinvoice.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
sendonion.request.json lightningd: change msatoshi args to amount_msat. 2022-06-21 06:52:35 +09:30
sendonion.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
sendonionmessage.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
sendpay.request.json lightningd: deprecate msatoshi in sendpay route. 2022-06-21 06:52:35 +09:30
sendpay.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
sendpsbt.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
sendpsbt.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
setchannel.schema.json setchannel: don't let them advertize htlc_maximum_msat larger than capacity. 2022-03-22 18:45:41 +10:30
setchannelfee.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
signmessage.request.json cln-rpc: Yet more RPC methods being mapped 2022-04-02 09:46:01 +10:30
signmessage.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
signpsbt.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
signpsbt.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
staticbackup.request.json doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
staticbackup.schema.json doc: Add documentation for new RPCs and a FIXME: in fromschema.py 2022-07-14 12:24:48 -05:00
stop.request.json msggen: Add stop method to generators 2022-07-21 14:19:06 +09:30
stop.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
txdiscard.request.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
txdiscard.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
txprepare.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
txprepare.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
txsend.request.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
txsend.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
unreserveinputs.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
utxopsbt.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
utxopsbt.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
waitanyinvoice.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
waitanyinvoice.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
waitblockheight.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
waitinvoice.request.json doc: set additionalProperties to false in all request schemas. 2022-04-02 09:46:01 +10:30
waitinvoice.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
waitsendpay.request.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
waitsendpay.schema.json doc: Annotate secrets and hashes in the JSON Schemas 2022-04-02 09:46:01 +10:30
withdraw.request.json doc/schemas: fixes for request schemas. 2022-04-02 09:46:01 +10:30
withdraw.schema.json jsonschema: Formatting json schema and regenerate docs 2021-11-28 10:55:48 +10:30
WRITING_SCHEMAS.md doc: Fixed grammars and add jq as dev dependences. 2021-11-28 10:55:48 +10:30