handshake-org.github.io
handshake-org.github.io copied to clipboard
Flags in docs diverged from implementation
The implementation in hsw-cli and most likely others moved from CamelCase to dash-case.
Example subtractFee -> subtract-fee.
This is not yet reflected within the docs: https://hsd-dev.org/api-docs/?shell--cli#send-a-transaction
Oh sorry I didn't realize this in the chat, but this is actually convention across hsd and bcoin:
Similar to the chart on the top here: https://hsd-dev.org/guides/config.html
CLI params are always dash-case (--api-key=...) cURL and JS params are camel case (apiKey:...)
Maybe we should add an INTRODUCTION page to the API docs that clears up some of these issues.
That makes sense. Knew that convention on the hsd side, but didn't think it would apply, when the docs show something different, but makes sense that they show that. Probably a note in general would be helpful. Especially, when examples are shown for CLI.
Closing anyway.
Reopening to remind us we should add that intro page explaining basic conventions in the api-docs.
TODO: Add to intro section at top of API docs that command line params are always --snake-case even if the API docs describe them they way are used in JavaScript constructors and cURL JSON data, which is camelCase