lbry-sdk icon indicating copy to clipboard operation
lbry-sdk copied to clipboard

Missing fields in the API documentation

Open RaphaelRobidas opened this issue 3 years ago • 1 comments

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.

RaphaelRobidas avatar Jul 24 '22 12:07 RaphaelRobidas

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.

moodyjon avatar Jul 24 '22 15:07 moodyjon