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

Fully document API using comments and @doc tags [JIRA: CLIENTS-563] #230

Open
nerophon opened this issue Sep 1, 2015 · 2 comments
Open

Comments

@nerophon
Copy link

nerophon commented Sep 1, 2015

A customer has noted that it is standard practice to properly document APIs, with specification of both success and all possible failure cases. This way, applications using the client will be easier to write, more complete, and more robust.

This is quite easy to do in Erlang using @doc tags above function definitions.

Going hand in hand with this, every function, whether part of the API or not, should have full type specs of expected returns using -type syntax, and pass dialyzer checks. This makes the documentation easier as well, and effectively proves the specifications by static analysis.

Inspired by Zendesk ticket #11805.

@Basho-JIRA Basho-JIRA changed the title Fully document API using comments and @edoc tags Fully document API using comments and @edoc tags [JIRA: CLIENTS-563] Sep 1, 2015
@nerophon nerophon changed the title Fully document API using comments and @edoc tags [JIRA: CLIENTS-563] Fully document API using comments and @doc tags [JIRA: CLIENTS-563] Sep 1, 2015
@hazen
Copy link

hazen commented Sep 1, 2015

Fantastic suggestion, @nerophon. I've noticed a dearth in comments in parts of the code.

@sata
Copy link

sata commented Sep 1, 2015

@nerophon: Will this also take #224 into consideration?

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

No branches or pull requests

4 participants