lbryio / lbry-sdk

The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
https://lbry.com
MIT License
7.2k stars 483 forks source link

Missing fields in the API documentation #3638

Open RaphaelRobidas opened 1 year ago

RaphaelRobidas commented 1 year ago

Certain required arguments are not specified in the current SDK API documentation. For example, wallet_send and account_send do not display an amount field, although it would be required. There are many other cases where some arguments could be missing, although I couldn't tell precisely all the cases. This appears to stem from a bug in scripts/generate_json_api.py.

moodyjon commented 1 year ago

https://github.com/lbryio/lbry-sdk/blob/ba60aeeebc1cf8e91d4127345e95091907c96d7b/scripts/generate_json_api.py#L466

Looks like the "Usage:" section of the docstring determines whether "is_required" will be true. But the argument also needs to be in the "Options:" section to be detected and emitted into docs/api.json.

https://github.com/lbryio/lbry-sdk/blob/ba60aeeebc1cf8e91d4127345e95091907c96d7b/lbry/extras/daemon/daemon.py#L1924

jsonrpc_account_send and jsonrpc_wallet_send don't have "--amount" and "--addresses" in the "Options:" section.