tools/fromschema.py: handle deprecated null field, don't create empty lists.

1. listpeers has a deprecated `"closer": null`, which we need
   to handle in the schema, while trying not to damage our
   documentation too much.

2. Don't print a condition if there are no fields to print.

3. Allow a special "untyped" marker for multifundchannel which returns
   arbitrary JSON in a field.

4. Allow a single field return (for 'stop').

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-06-16 10:38:17 +09:30
parent 1a181a3240
commit 6e636a835f
67 changed files with 105 additions and 76 deletions

View file

@ -35,4 +35,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:dd8b1fd2ffcf7c57629a042f44f2fbc526d8892a2c933de6e82511721a8ffdea \" SHA256STAMP:cf8eccccfb5e26329100122ce2ed8a0dde4892aab91761c18b935a62fba73eeb

View file

@ -41,4 +41,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:f974a3848c4db5b73fffa969a741ef6619c9a375783fabe731882d84a6bbf5ff) [comment]: # ( SHA256STAMP:f807f98a54c194fab710f8a3393e96685fdbd0efa5e178cca54507a70a7a5c20)

View file

@ -54,4 +54,4 @@ ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:dd3f512e81f45ab6084b608bc05fba5679b1d20d493aad98d422bdf593182604 \" SHA256STAMP:607f888f8c0228257fbeeb382262be93191f1da2be1fdebcf619b500889e349a

View file

@ -49,4 +49,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:2accf7788133af97ae097f7e4e8a80b35bbb431eb7e787e5ae12dd5c7d2c296d) [comment]: # ( SHA256STAMP:b03847eff3fac04edb72f6ef86b31a2d05c077a8771845717a26f463ebed4ae7)

2
doc/lightning-check.7 generated
View file

@ -39,4 +39,4 @@ Mark Beckwith \fI<wythe@intrig.com\fR> and Rusty Russell
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:9e78651117d3546edaf5150621630ee5dc4ccefd6e6a17b52b9dc8f86e8ba0c9 \" SHA256STAMP:23dcfd6ce780b46a9d700cee5cdf7221702ea2a8c587461b92982172e79ee836

View file

@ -39,4 +39,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:5b399ee88a5fb6b7eac0e1ac349a68a8715154f8c6468aedf446c703c91ac165) [comment]: # ( SHA256STAMP:3dd679aceebf5dca6daabc1b28a0f95c413daa9a689bf55270b38b57f0b17957)

2
doc/lightning-close.7 generated
View file

@ -123,4 +123,4 @@ ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:17f5bb362d8501b04314756c4134e3d5d20f8729dd55f5f3cfa0b5e111b104a1 \" SHA256STAMP:03f1e6937a88aad4bdcd29d010da9ced148e3498ea19b388e8cbfde25276482d

View file

@ -107,4 +107,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:9159304cd705d8135c32e12bd029c0e95baff0d495e6f9092a75888dab2f5fb3) [comment]: # ( SHA256STAMP:d590b312dff1e1fb4e0bf5540d04bfa4925f6cba51bef6664a642e382ec257d9)

View file

@ -130,4 +130,4 @@ Felix \fI<fixone@gmail.com\fR> is the original author of this manpage\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:ff422184feb295e6d3e17e88c0305405edcb24eac59482a43caf750ef281e0ed \" SHA256STAMP:47e5ec1e2d3cca8a40bd9b93faff9fd226b4fd481ab4c3c81d67f15dc6f8b839

View file

@ -88,4 +88,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:5b168e7998d3db6a842eabf92bcbb74352fe831726ea42a801e39ff5c3f812ca) [comment]: # ( SHA256STAMP:973f366e2f87becdece4ba3b71f9a5156529d7c155bb8fcac0d2b6662a9e467d)

View file

@ -91,4 +91,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:2d654675f966516a0fb0553f66e5bacd3ab96482d20cd9701a84e15ae49a4d92 \" SHA256STAMP:fd9275c58b67eca68aafee27cb79a558669b12b8cda56872f1db798637006278

View file

@ -72,4 +72,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:95a2fbf9c94fa1e01a322658035473c694bfb93e02d32c2cefafe6ef5b676695) [comment]: # ( SHA256STAMP:948d344d5f589050127bd5181689882c6fad036799fa6ff039a83194ff5fd098)

View file

@ -153,4 +153,4 @@ Christian Decker \fI<decker.christian@gmail.com\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:c21aa197637bea17068072cd5907ad3302b48586067a8a5a8d748fd8e7e0a668 \" SHA256STAMP:cf1acef3ea6f29fc4fb98ee418693d8ffb1b35b4f22345c9e2ce45a91f3efd4d

View file

@ -135,4 +135,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[bolt04]: https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md [bolt04]: https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md
[comment]: # ( SHA256STAMP:a5a64325f4232f27bccbbe1c9fc62bfb602ba60c81f46a1ef2df25b06dac807e) [comment]: # ( SHA256STAMP:68e54caa71beb0445389b61d8b384e40ec91e7569d4e2f2de05ed7612713ee64)

View file

@ -414,4 +414,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:403b7cf3cadd8b260b8b2b02746c76d7d21a8319fe386b4174f4f58b3e5dcdbd \" SHA256STAMP:045cd00ad893483df132bdffd913049bfe43acb152a511accc9f17f87ba06a8d

View file

@ -183,4 +183,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:733d22404e5230882682b846ace92451d8988cf028fa903d735f61b7c61f1c08) [comment]: # ( SHA256STAMP:f0adee97f3b5776059252703efee1b8e244c1141f9f3dd5fe73e3d7ed4d59ab4)

View file

@ -107,4 +107,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:1b0e5c34291b3c252c651e952109f57fe68a90770fecaa0eeebf9070ed8c2dad \" SHA256STAMP:38fe5fd558271a8c5d34f3a4dd114d83389545b38b92b89ec0b16da70b73539a

View file

@ -68,4 +68,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:33a160a1d9e56690e59b71c4d9d3e141bf7604c111cd5a5624bda692b85c9026) [comment]: # ( SHA256STAMP:435b2a155971979a75be7e9aefc5a686795c3ab210b94af72cf069bd5f3bcefc)

View file

@ -30,4 +30,4 @@ ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:a47d47609d9b39bbe6c0f0c61e28d255ceb496a49ad306db22ef23011c6f8cb8 \" SHA256STAMP:dfb82c8bfb0c1891ac29d98f9eddaf05fb1ae8a9529893003371581e4343e72c

View file

@ -37,4 +37,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:f267fd509a5e3e55e2322ddc8b233eb820638ed5f50f606e3e6c8ae17f1c8421) [comment]: # ( SHA256STAMP:644749218693cab4f48f6557a908aba66ae32f6b769576345f66ad62a6c7e7e0)

View file

@ -93,4 +93,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:4cd2b2a9c5dd9ad04bede3efc80981e78e147b21312fa63389ab88f6a681e1ad \" SHA256STAMP:ff36afbf0c8f27efd0c6e82f32ba783e511f53f5978342b210ba78038c1934bf

View file

@ -71,4 +71,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:eb1f069240a14c56d3fc336c56be2fed4f966d6aa2edaa5697ede821ebc5140b) [comment]: # ( SHA256STAMP:6435d88007d1b21e97c969cc202e240ed57df572a3312a6b77ea66ed3a8d512a)

View file

@ -120,4 +120,4 @@ Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:2c64d4cc71ef5cd6100f167abcd6219c7469f8fc0458799ef368b7394ffb02f2 \" SHA256STAMP:143436ad1fe8687300cb5ccb433630905a56af81aaf3aa61abfa7b1548af9177

View file

@ -99,4 +99,4 @@ RESOURCES
--------- ---------
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ef20bfc63196d77869d8e8922dc6893231b0f02f9fdd80c9d3a252a58521f0da) [comment]: # ( SHA256STAMP:c3a603b1e43a370ff38a3d9eebe63f8acf26447b024cf5e4bd6f93fe41632529)

View file

@ -78,4 +78,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:33b8cddae4a830e710906268c1d0d301442bc7ab0711e1d6ce670f86c77ae320 \" SHA256STAMP:03b1a12409ad02eca1543d99bafdfbd2d7d2c869e182fba513e3f93fb48a7664

View file

@ -72,4 +72,4 @@ RESOURCES
--------- ---------
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:6b0ae21e38a83742735f38e9c022b33ed4a436cacc746ff22e63d7b00779e4d0) [comment]: # ( SHA256STAMP:abf340bf35dcefd42fba609b3ae95adb2f74bb5766c68e174a9b8f9114c80202)

View file

@ -63,4 +63,4 @@ Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:7efc0fbbb7397d3767ea170ba091b5bc00f4efaf8e1283c7b7ed1aaaccfd3c4d \" SHA256STAMP:ce9e367309c8e5cabc9d4ac8dfd878f893dd3b9235c0c4b1a2bb0e431cf5b5f6

View file

@ -58,4 +58,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:f974a3848c4db5b73fffa969a741ef6619c9a375783fabe731882d84a6bbf5ff) [comment]: # ( SHA256STAMP:f807f98a54c194fab710f8a3393e96685fdbd0efa5e178cca54507a70a7a5c20)

View file

@ -169,4 +169,4 @@ manpage\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:6e1ae2f26676a76231461ac1f696066e538edabfab00ec9480550a5c6bc6981e \" SHA256STAMP:4c54ce8e279cf43b55ad0dffea21df46bfb5698d49833013da9e4df4c1475ee4

View file

@ -118,4 +118,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:e16ae963e528995f1e01c80b4ed4e9b0d6c457a559928e98ab6cf32624557894) [comment]: # ( SHA256STAMP:b7efbc2380ce39e1d8f244a9c16203f034d53b84f8396f4c4fc06973d24cefe4)

View file

@ -114,4 +114,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:23be8c105314c109fa0f7c532c3eebf9b2cbe47f520d600d3d2159765def3cbd \" SHA256STAMP:532248cb5adbadb10367fdbddc2da7af0eeac50b29709abec2e1e8b178197b7c

View file

@ -81,4 +81,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:e2b81ad7a61dd6a6d55e21c5367c3286aaf00cee734b2719a8e38bc87f7ac8aa) [comment]: # ( SHA256STAMP:c98a6dd644a23fb336aa2ce190e15ae602da8b4142afbed28e4243114f679e90)

View file

@ -130,4 +130,4 @@ channel parameters (funding limits, channel reserves, fees, etc\.)\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:ee8d7d247d9d4f263f8bbed936a2ba4b61d4afc5c48580f462a0d6142c13dbbd \" SHA256STAMP:d25fc36b745b6f58556f7f4b06f23ff83b466d4a00911f7ffdc9d86572902954

View file

@ -103,4 +103,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:5b17c334b90f840a986750f9fcdb6a6bfa79bd1a3da11319a1957ba87bc4b0a7) [comment]: # ( SHA256STAMP:6c8f18b20d695e0b4dba0786f9fc70042a6cc9970aeb7cca2ad1c8fc4c406244)

View file

@ -64,4 +64,4 @@ lightning-openchannel_\fBsigned\fR(7), lightning-openchannel_\fBabort\fR(7)
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:d9006c6b2519f1ae2009a683e3e8131af6e182929d8f0025e451155e4e7d6fe6 \" SHA256STAMP:b7e57e7a5eec165705d41d34205ac47ce1fe540c0bb9e4b6e36ae2da51322d67

View file

@ -58,4 +58,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:f639e58991b8a9b58b181e9f4bd325fb24368af5cb76f94a94ca21675421829b) [comment]: # ( SHA256STAMP:61df28ebb6211155b8be8810c09e7d238b4a6857d5f1c558f30c63df19c2fd4d)

View file

@ -68,4 +68,4 @@ lightning-openchannel_\fBabort\fR(7)
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:72b7e8826beb42061bf53e59b72c35c4fba6cdb421e491ffe6bf07dc51412342 \" SHA256STAMP:51894a500920df4510ca85db038527f8ef7138fba3afcea0cb1326ac1142f567

View file

@ -60,4 +60,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:7cb52658d81c5834e34a6011c04283bf740fe6e5feedb0208778abad5fddc519) [comment]: # ( SHA256STAMP:5d6a53a68f16ec338c75e26e0e7ffbc4390afb771ca636eed4206cb8fdd56943)

View file

@ -93,4 +93,4 @@ lightning-openchannel_\fBabort\fR(7)
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:959e97d593fb77f9403e8c5024d5582a2ae81b5cffae1799a285e0a26281b770 \" SHA256STAMP:2eeea3afea8c76e2cc9d5f449d43f1dbfe8e68edcc4e1ee33cb88d024e5f03de

View file

@ -78,4 +78,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:9417a2d8d48b69f3557b08984d6b362e20cf20eeefcbef168fdc84b6f1de6411) [comment]: # ( SHA256STAMP:164e9d5c0adfe28e392e0d7e5401ca301ce1f0fafeb944b56836f0be91754e2f)

View file

@ -147,4 +147,4 @@ Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial versi
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:637babe08b35ca524666bc51f1d0191e2006064af2b4c22997fbbe49cc7f935c \" SHA256STAMP:3e1c0f27024c64e02c2a84c093f9de3dbec882c4dacb3fd45b7bc3f4eb98fc5e

View file

@ -114,4 +114,4 @@ RESOURCES
--------- ---------
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:2aa0f0cf9de7b2d373bdce8b337535a0197ad8cb1df2cdb0e043ba49c3704816) [comment]: # ( SHA256STAMP:50348a6798a89537bd7a15b1725c479e13f890fe77cbf6d8f0722e91c05eadd1)

View file

@ -127,4 +127,4 @@ Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial versi
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:13e3ab43fb6811bff8bee102ba85e7d4cb8eb97d11bb0720ae5c0c576ba021ec \" SHA256STAMP:2503c2177e9d87f2d00338f2844f041dceec9458604d228732dade6e38fdf26e

View file

@ -89,4 +89,4 @@ RESOURCES
--------- ---------
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:db99eeb155bb44ebda8b77afdc1fad773e82fa8892e1df6afd61c60a1f4b7ec3) [comment]: # ( SHA256STAMP:4336a649aa44151ac41b408fea9e3c68c76a6b3b981925fb79c0e7b0ca73a543)

View file

@ -147,4 +147,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:aaf1dab77352de52f8bf8a5c3e4a6449769b5dbfa51bdbf9b1a06575c8ae37fe \" SHA256STAMP:313ccec881c876d2383b65f9fe0e6f95cfc8bebf3b5739cd5aa439530a98bb53

View file

@ -308,4 +308,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c15c56751270e8a3df25f3e3f72fbe8ea56366e5fe1157a8485b85cec1878982) [comment]: # ( SHA256STAMP:a65836437a8dd19873cb9ff09a7fcbb2cee5e90f6bf61cabc1215c6dc41e01c3)

View file

@ -94,4 +94,4 @@ SECG SEC-1 ECIES: \fIhttps://secg.org/sec1-v2.pdf\fR
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
.RE .RE
\" SHA256STAMP:c0cd7eab8f5114c3b7532b68861767df729757a1af9331330134d956db23e0a4 \" SHA256STAMP:15ae6db73b5935de65901d6507c99c15c6dd847965555963c6fcf7cd7a64c74b

View file

@ -90,4 +90,4 @@ RESOURCES
* Main web site: <https://github.com/ElementsProject/lightning> * Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:23508d8a2af693bf5a6b4de2a3d2c4527b3fb8502fb775f06cfe84bf3a5aedbe) [comment]: # ( SHA256STAMP:e7542ba319a25191968aacaa577e0bc29928f6069156eff286c7892444691c74)

2
doc/lightning-help.7 generated
View file

@ -78,4 +78,4 @@ Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial versi
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:e162d82c81f6a121839d2dfa1658014867f058fe52a100a885956f566a211a8e \" SHA256STAMP:69bc1cd80da8ce53c2f258fdcd5b8d0909478629d1d3ceeead0d6a3052484f2e

View file

@ -66,4 +66,4 @@ RESOURCES
--------- ---------
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:29119344d1800c7020c96a10ed94bfbf3c57491cc30e9b1f847facbdf0249aba) [comment]: # ( SHA256STAMP:89fb5e6d1f3127f8a4331fb00756871565c10e874a24554c60fa1a0e26ca5c8f)

View file

@ -136,4 +136,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:69f1d573c0f7afe0cd63e2975d4a8e33d8a1acd2aabb6922b878d55c58731d72 \" SHA256STAMP:f27f015d8d612d280a8abca6930dbd42ef37fdac00bff1b114d1fd9138b15097

View file

@ -111,4 +111,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:71eeaa119c355874d52c511e09816291e296b0709dc6acb6cefd5614bdc20fd2) [comment]: # ( SHA256STAMP:e63e87b91a14b8ae823ae67fc25315bc31b15a14378c05f4c972830bf3515af1)

View file

@ -93,4 +93,4 @@ BOLT #7:
\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md\fR \fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md\fR
.RE .RE
\" SHA256STAMP:4f6181982e495f601d20c33f827a48f6f80c7f268f30b8e73b0a3e9ae2790838 \" SHA256STAMP:e228d4a2553ac8fc052fd0c3acfac32cdce6f0cfd37f1bb238a87de2fa99e553

View file

@ -72,4 +72,4 @@ Lightning RFC site
- BOLT \#7: - BOLT \#7:
<https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md> <https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md>
[comment]: # ( SHA256STAMP:b14e060fc39b569657050d5bb894c22c0dc575593804248746323b803053b57b) [comment]: # ( SHA256STAMP:b24b9cef75bf6809a85ee5ff9b821ffad68d012dc58b514844675c63c469488e)

View file

@ -77,4 +77,4 @@ Rene Pickhardt \fI<r.pickhardt@gmail.com\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:c2fd8db0d86c538202c27c14bbfbbca7319d1664d22290d6ac7605d1b3160cb9 \" SHA256STAMP:d4a2dabe17b640041d019e82549c8cd5492e9c00ccec544b9bf80ff0f2c68ad0

View file

@ -57,4 +57,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:4d4179b29525707c4c1a22aa56dc46c0875562a43f5bc7d2b7d3838b32b5bad0) [comment]: # ( SHA256STAMP:d2fe60f5039f5ad4682c88ce88d513c0ad74d8d4967dd233b399a19e27aac2ee)

View file

@ -110,4 +110,4 @@ Felix \fI<fixone@gmail.com\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:499d7e1edccfa0751263e1742c31ca1349922ccc7cd4e6134ff016048be2e0aa \" SHA256STAMP:0df04d09e7e7d3344a64f0ecd03186d1499014346d4c37c0d08390328f1f8f04

View file

@ -66,4 +66,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:e8ce919941927237a08bbe84a2e4fbd86d391c6b9d502b85a4c9d1a20a8b2958) [comment]: # ( SHA256STAMP:878fab92cc95fdb4680c13f3a2d791e9bbaac3ea732608ece65e684428f7705a)

View file

@ -65,4 +65,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:9567c510a5ab2fd47149c7f6e213c65eaa0ab5f29adbe649838986d70049b56b \" SHA256STAMP:1ac6fb88dc05d683e81dc951a593d88027310b9c62dd81c57e134238994b0562

View file

@ -53,4 +53,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:912e82238ba0d47bae3ce8f8e16f22cf5f2c62936efb150092f17766abdb4455) [comment]: # ( SHA256STAMP:67ff5d9aa945301f23d6694304e4b657a37f0b3f80cc1c13c2ff23a55fe51d4b)

View file

@ -101,4 +101,4 @@ FIXME:
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:ab3ff8fd9153e01f861080fade794a4899397fbcca65d0c3af69b9bb5f1144fb \" SHA256STAMP:4366d5c238bccc06cfafc4c2d375dd417049b0b6224f13b2dcc9f25139587649

View file

@ -83,4 +83,4 @@ RESOURCES
--------- ---------
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:8c35b13edbb60a3403da9317b3177c0a5b9826cf0f06077424e94b1ddb7f1697) [comment]: # ( SHA256STAMP:2f644d55512f5c03e3894341fb039fc1b7d2ebc5f210547fdb324d2f23689b37)

View file

@ -82,4 +82,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:919c848c1d8fa62be1d6c9453c90073306bc168a6969afd836a00861b61b0367 \" SHA256STAMP:7e359219084e648a629b0d43774db17bbfbe693074b817fa5890b7c8bccd1429

View file

@ -78,4 +78,4 @@ RESOURCES
--------- ---------
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:94ee9c8562d592be0a15805fb3883ffff44d7e3319f58537fdeb30e5c3d5b9e7) [comment]: # ( SHA256STAMP:58e9f5aa5808e19e3be151b1c1f1215ec23953b60ab294418aa57426c5bcbd46)

View file

@ -74,4 +74,4 @@ Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:4037a4dd9746b5dfc91ef2f5b4fa9000a334689157d9ac86dc4dba5c82628cfe \" SHA256STAMP:9b593ed02c10b34ae6f36f91963da0a244df0c3963aaa990e7477008fd3af18d

View file

@ -54,4 +54,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning> Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:12e7b91fc59ee65b61d9aba4e8586fda8fbb524a7e548ffa36862e204952c46b) [comment]: # ( SHA256STAMP:22b3a2437901da705b706792b9e263ab65e002835ad3f5735895f8d971699c3b)

View file

@ -14,6 +14,8 @@ def json_value(obj):
return '*false*' return '*false*'
if type(obj) is str: if type(obj) is str:
return '"' + obj + '"' return '"' + obj + '"'
if obj is None:
return '*null*'
assert False assert False
@ -28,6 +30,10 @@ def output(line):
def output_type(properties, is_optional): def output_type(properties, is_optional):
# FIXME: there's a horrible hack for listpeers' closer which can be NULL
if type(properties['type']) is list:
typename = properties['type'][0]
else:
typename = properties['type'] typename = properties['type']
if typename == 'array': if typename == 'array':
typename += ' of {}s'.format(properties['items']['type']) typename += ' of {}s'.format(properties['items']['type'])
@ -63,10 +69,17 @@ def output_range(properties):
output(' (one of {})'.format(', '.join([json_value(p) for p in properties['enum']]))) output(' (one of {})'.format(', '.join([json_value(p) for p in properties['enum']])))
def output_member(propname, properties, is_optional, indent, print_type=True): def output_member(propname, properties, is_optional, indent, print_type=True, prefix=None):
"""Generate description line(s) for this member""" """Generate description line(s) for this member"""
output(indent + '- **{}**'.format(propname))
if print_type: if prefix is None:
prefix = '- **{}**'.format(propname)
output(indent + prefix)
# We make them explicitly note if they don't want a type!
is_untyped = 'untyped' in properties
if not is_untyped and print_type:
output_type(properties, is_optional) output_type(properties, is_optional)
if 'description' in properties: if 'description' in properties:
@ -74,10 +87,10 @@ def output_member(propname, properties, is_optional, indent, print_type=True):
output_range(properties) output_range(properties)
if properties['type'] == 'object': if not is_untyped and properties['type'] == 'object':
output(':\n') output(':\n')
output_members(properties, indent + ' ') output_members(properties, indent + ' ')
elif properties['type'] == 'array': elif not is_untyped and properties['type'] == 'array':
output(':\n') output(':\n')
output_array(properties['items'], indent + ' ') output_array(properties['items'], indent + ' ')
else: else:
@ -97,6 +110,17 @@ def output_array(items, indent):
output('\n') output('\n')
def has_members(sub):
"""Does this sub have any properties to print?"""
for p in list(sub['properties'].keys()):
if len(sub['properties'][p]) == 0:
continue
if 'deprecated' in sub['properties'][p]:
continue
return True
return False
def output_members(sub, indent=''): def output_members(sub, indent=''):
"""Generate lines for these properties""" """Generate lines for these properties"""
warnings = [] warnings = []
@ -161,6 +185,8 @@ def output_members(sub, indent=''):
conditions.append(cond) conditions.append(cond)
sentence = indent + "If " + ", and ".join(conditions) + ":\n" sentence = indent + "If " + ", and ".join(conditions) + ":\n"
if has_members(ifclause['then']):
# Prefix with blank line. # Prefix with blank line.
outputs(['\n', sentence]) outputs(['\n', sentence])
@ -169,7 +195,10 @@ def output_members(sub, indent=''):
def generate_from_schema(schema): def generate_from_schema(schema):
"""This is not general, but works for us""" """This is not general, but works for us"""
assert schema['type'] == 'object' if schema['type'] != 'object':
# 'stop' returns a single string!
output_member(None, schema, False, '', prefix='On success, returns a single element')
return
toplevels = [] toplevels = []
warnings = [] warnings = []