Skip to content

Commit

Permalink
doc: updated schemas for json_examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui authored and rustyrussell committed Apr 4, 2024
1 parent dbcef94 commit 9e782f4
Show file tree
Hide file tree
Showing 118 changed files with 11,012 additions and 10,549 deletions.
10,753 changes: 5,487 additions & 5,266 deletions contrib/msggen/msggen/schema.json

Large diffs are not rendered by default.

54 changes: 42 additions & 12 deletions doc/rpc-schema-draft.json
Original file line number Diff line number Diff line change
Expand Up @@ -389,16 +389,50 @@
"type": "string"
}
},
"example_json_request": {
"json_example": {
"type": "array",
"items": {
"id": {
"type": "integer"
},
"method": {
"type": "string"
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "array",
"items": {
"type": "string"
}
},
"request": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"method": {
"type": "string"
},
"params": {}
},
"required": [
"id",
"method",
"params"
]
},
"response": {
"type": "object",
"properties": {
"patternProperties": {
"^[a-zA-Z_][a-zA-Z0-9_]*$": {
"$ref": "#/definitions/schemaArray"
}
}
}
}
},
"params": {}
"required": [
"request",
"response"
]
}
},
"notes": {
Expand Down Expand Up @@ -464,10 +498,6 @@
"type": "string"
}
},
"example_json_response": {
"type": "array",
"items": {}
},
"example_json_notifications": {
"type": "array",
"items": {
Expand Down Expand Up @@ -517,4 +547,4 @@
"request",
"response"
]
}
}
32 changes: 17 additions & 15 deletions doc/schemas/lightning-addgossip.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,28 @@
"response": {
"properties": {}
},
"example_json_request": [
"json_example": [
{
"id": "example:addgossip#1",
"method": "addgossip",
"params": {
"message": "010078c3314666731e339c0b8434f7824797a084ed7ca3655991a672da068e2c44cb53b57b53a296c133bc879109a8931dc31e6913a4bda3d58559b99b95663e6d52775579447ef5526300e1bb89bc6af8557aa1c3810a91814eafad6d103f43182e17b16644cb38c1d58a8edd094303959a9f1f9d42ff6c32a21f9c118531f512c8679cabaccc6e39dbd95a4dac90e75a258893c3aa3f733d1b8890174d5ddea8003cadffe557773c54d2c07ca1d535c4bf85885f879ae466c16a516e8ffcfec1740e3f5c98ca9ce13f452e867befef5517f306ed6aa5119b79059bcc6f68f329986b665d16de7bc7df64e3537504c91eeabe0e59d3a2b68e4216ead2b0f6e3ef7c000006226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f0000670000010000022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d590266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c0351802e3bd38009866c9da8ec4aa99cc4ea9c6c0dd46df15c61ef0ce1f271291714e5702324266de8403b3ab157a09f1f784d587af61831c998c151bcc21bb74c2b2314b"
}
"request": {
"id": "example:addgossip#1",
"method": "addgossip",
"params": {
"message": "010078c3314666731e339c0b8434f7824797a084ed7ca3655991a672da068e2c44cb53b57b53a296c133bc879109a8931dc31e6913a4bda3d58559b99b95663e6d52775579447ef5526300e1bb89bc6af8557aa1c3810a91814eafad6d103f43182e17b16644cb38c1d58a8edd094303959a9f1f9d42ff6c32a21f9c118531f512c8679cabaccc6e39dbd95a4dac90e75a258893c3aa3f733d1b8890174d5ddea8003cadffe557773c54d2c07ca1d535c4bf85885f879ae466c16a516e8ffcfec1740e3f5c98ca9ce13f452e867befef5517f306ed6aa5119b79059bcc6f68f329986b665d16de7bc7df64e3537504c91eeabe0e59d3a2b68e4216ead2b0f6e3ef7c000006226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f0000670000010000022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d590266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c0351802e3bd38009866c9da8ec4aa99cc4ea9c6c0dd46df15c61ef0ce1f271291714e5702324266de8403b3ab157a09f1f784d587af61831c998c151bcc21bb74c2b2314b"
}
},
"response": {}
},
{
"id": "example:addgossip#2",
"method": "addgossip",
"params": {
"message": "0102420526c8eb62ec6999bbee5f1de4841cab734374ec642b7deeb0259e76220bf82e97a241c907d5ff52019655f7f9a614c285bb35690f3a1a2b928d7b2349a79e06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f000067000001000065b32a0e010100060000000000000000000000010000000a000000003b023380"
}
"request": {
"id": "example:addgossip#2",
"method": "addgossip",
"params": {
"message": "0102420526c8eb62ec6999bbee5f1de4841cab734374ec642b7deeb0259e76220bf82e97a241c907d5ff52019655f7f9a614c285bb35690f3a1a2b928d7b2349a79e06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f000067000001000065b32a0e010100060000000000000000000000010000000a000000003b023380"
}
},
"response": {}
}
],
"example_json_response": [
{},
{}
],
"author": [
"Rusty Russell <<[email protected]>> is mainly responsible."
],
Expand Down
82 changes: 43 additions & 39 deletions doc/schemas/lightning-addpsbtoutput.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,55 +75,59 @@
"lightning-cli addpsbtoutput 100000sat",
"```"
],
"example_json_request": [
"json_example": [
{
"id": "example:addpsbtoutput#1",
"method": "addpsbtoutput",
"params": {
"satoshi": 100000,
"initialpsbt": null,
"locktime": null,
"destination": null
"request": {
"id": "example:addpsbtoutput#1",
"method": "addpsbtoutput",
"params": {
"satoshi": 100000,
"initialpsbt": null,
"locktime": null,
"destination": null
}
},
"response": {
"psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIoIYBAAAAAAABBCJRIHg2NV/cioLcTLAKdyxVVBUdBjhKTdZejT9orAhWa4S+AA==",
"estimated_added_weight": 172,
"outnum": 0
}
},
{
"id": "example:addpsbtoutput#2",
"method": "addpsbtoutput",
"params": {
"satoshi": 1000000,
"initialpsbt": null,
"locktime": 111,
"destination": null
"request": {
"id": "example:addpsbtoutput#2",
"method": "addpsbtoutput",
"params": {
"satoshi": 1000000,
"initialpsbt": null,
"locktime": 111,
"destination": null
}
},
"response": {
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4uAA==",
"estimated_added_weight": 172,
"outnum": 0
}
},
{
"id": "example:addpsbtoutput#3",
"method": "addpsbtoutput",
"params": {
"satoshi": 974343,
"initialpsbt": "cHNidP8BAF4CAAAAAfwbEpvpi6D14YV4VLnuVB47Y0uF41kXEyJRL4IusySSAQAAAAD9////ASICAAAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL5nAAAAAAEA9gIAAAAAAQFEkxvLatohY6mw5gr5qG1aiArSrziFPR2YoqD21Hv+RAAAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNrz8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIEu1nfVRt9i+rFM219mwhMqdwJsqygWSWTFUS+cemdh6AiBG3Qo8g9J/aAMO2RHDsIBScscj6pTTIwZp7Gw8G3EOKAEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPZgAAAAEBK68/DwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oAAA==",
"locktime": null,
"destination": "bcrt1q9tc6q49l6wrrtp8ul45rj92hsleehwwxty32zu"
"request": {
"id": "example:addpsbtoutput#3",
"method": "addpsbtoutput",
"params": {
"satoshi": 974343,
"initialpsbt": "cHNidP8BAF4CAAAAAfwbEpvpi6D14YV4VLnuVB47Y0uF41kXEyJRL4IusySSAQAAAAD9////ASICAAAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL5nAAAAAAEA9gIAAAAAAQFEkxvLatohY6mw5gr5qG1aiArSrziFPR2YoqD21Hv+RAAAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNrz8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIEu1nfVRt9i+rFM219mwhMqdwJsqygWSWTFUS+cemdh6AiBG3Qo8g9J/aAMO2RHDsIBScscj6pTTIwZp7Gw8G3EOKAEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPZgAAAAEBK68/DwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oAAA==",
"locktime": null,
"destination": "bcrt1q9tc6q49l6wrrtp8ul45rj92hsleehwwxty32zu"
}
},
"response": {
"psbt": "cHNidP8BAH0CAAAAAfwbEpvpi6D14YV4VLnuVB47Y0uF41kXEyJRL4IusySSAQAAAAD9////AiICAAAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL4H3g4AAAAAABYAFCrxoFS/04Y1hPz9aDkVV4fzm7nGZwAAAAABAPYCAAAAAAEBRJMby2raIWOpsOYK+ahtWogK0q84hT0dmKKg9tR7/kQAAAAAAP3///8CQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAza8/DwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oCRzBEAiBLtZ31UbfYvqxTNtfZsITKncCbKsoFklkxVEvnHpnYegIgRt0KPIPSf2gDDtkRw7CAUnLHI+qU0yMGaexsPBtxDigBIQPXRURck2JmXyLg2W6edm8nPzJg3qOcina/oF3SaE3cz2YAAAABASuvPw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAAAA",
"estimated_added_weight": 172,
"outnum": 1
}
}
],
"example_json_response": [
{
"psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIoIYBAAAAAAABBCJRIHg2NV/cioLcTLAKdyxVVBUdBjhKTdZejT9orAhWa4S+AA==",
"estimated_added_weight": 172,
"outnum": 0
},
{
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4uAA==",
"estimated_added_weight": 172,
"outnum": 0
},
{
"psbt": "cHNidP8BAH0CAAAAAfwbEpvpi6D14YV4VLnuVB47Y0uF41kXEyJRL4IusySSAQAAAAD9////AiICAAAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL4H3g4AAAAAABYAFCrxoFS/04Y1hPz9aDkVV4fzm7nGZwAAAAABAPYCAAAAAAEBRJMby2raIWOpsOYK+ahtWogK0q84hT0dmKKg9tR7/kQAAAAAAP3///8CQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAza8/DwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oCRzBEAiBLtZ31UbfYvqxTNtfZsITKncCbKsoFklkxVEvnHpnYegIgRt0KPIPSf2gDDtkRw7CAUnLHI+qU0yMGaexsPBtxDigBIQPXRURck2JmXyLg2W6edm8nPzJg3qOcina/oF3SaE3cz2YAAAABASuvPw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAAAA",
"estimated_added_weight": 172,
"outnum": 1
}
],
"author": [
"Dusty <<@dusty_daemon>> is mainly responsible."
],
Expand Down
56 changes: 29 additions & 27 deletions doc/schemas/lightning-autoclean-once.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,38 +186,40 @@
}
}
},
"example_json_request": [
"json_example": [
{
"id": "example:autoclean-once#1",
"method": "autoclean-once",
"params": [
"failedpays",
1
]
},
{
"id": "example:autoclean-once#2",
"method": "autoclean-once",
"params": [
"succeededpays",
1
]
}
],
"example_json_response": [
{
"autoclean": {
"failedpays": {
"cleaned": 1,
"uncleaned": 1
"request": {
"id": "example:autoclean-once#1",
"method": "autoclean-once",
"params": [
"failedpays",
1
]
},
"response": {
"autoclean": {
"failedpays": {
"cleaned": 1,
"uncleaned": 1
}
}
}
},
{
"autoclean": {
"succeededpays": {
"cleaned": 1,
"uncleaned": 0
"request": {
"id": "example:autoclean-once#2",
"method": "autoclean-once",
"params": [
"succeededpays",
1
]
},
"response": {
"autoclean": {
"succeededpays": {
"cleaned": 1,
"uncleaned": 0
}
}
}
}
Expand Down
94 changes: 48 additions & 46 deletions doc/schemas/lightning-autoclean-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,57 +414,59 @@
"Note that the ages parameters are set by various `autoclean-...-age` parameters in your configuration: see lightningd-config(5)."
]
},
"example_json_request": [
"json_example": [
{
"id": "example:autoclean-status#1",
"method": "autoclean-status",
"params": {
"subsystem": "expiredinvoices"
}
},
{
"id": "example:autoclean-status#2",
"method": "autoclean-status",
"params": {
"subsystem": null
}
}
],
"example_json_response": [
{
"autoclean": {
"expiredinvoices": {
"enabled": false,
"cleaned": 0
"request": {
"id": "example:autoclean-status#1",
"method": "autoclean-status",
"params": {
"subsystem": "expiredinvoices"
}
},
"response": {
"autoclean": {
"expiredinvoices": {
"enabled": false,
"cleaned": 0
}
}
}
},
{
"autoclean": {
"succeededforwards": {
"enabled": false,
"cleaned": 0
},
"failedforwards": {
"enabled": false,
"cleaned": 0
},
"succeededpays": {
"enabled": false,
"cleaned": 0
},
"failedpays": {
"enabled": false,
"cleaned": 0
},
"paidinvoices": {
"enabled": false,
"cleaned": 0
},
"expiredinvoices": {
"enabled": true,
"age": 2,
"cleaned": 0
"request": {
"id": "example:autoclean-status#2",
"method": "autoclean-status",
"params": {
"subsystem": null
}
},
"response": {
"autoclean": {
"succeededforwards": {
"enabled": false,
"cleaned": 0
},
"failedforwards": {
"enabled": false,
"cleaned": 0
},
"succeededpays": {
"enabled": false,
"cleaned": 0
},
"failedpays": {
"enabled": false,
"cleaned": 0
},
"paidinvoices": {
"enabled": false,
"cleaned": 0
},
"expiredinvoices": {
"enabled": true,
"age": 2,
"cleaned": 0
}
}
}
}
Expand Down
Loading

0 comments on commit 9e782f4

Please sign in to comment.