Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flags in docs diverged from implementation #58

Open
stp-ip opened this issue Mar 10, 2020 · 4 comments
Open

Flags in docs diverged from implementation #58

stp-ip opened this issue Mar 10, 2020 · 4 comments

Comments

@stp-ip
Copy link

stp-ip commented Mar 10, 2020

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

@pinheadmz
Copy link
Member

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.

@stp-ip
Copy link
Author

stp-ip commented Mar 10, 2020

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.

@stp-ip stp-ip closed this as completed Mar 10, 2020
@pinheadmz
Copy link
Member

Reopening to remind us we should add that intro page explaining basic conventions in the api-docs.

@pinheadmz pinheadmz reopened this Mar 12, 2020
@pinheadmz
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants