Skip to content

Awesome API Documentation #31

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

Merged
merged 1 commit into from
Dec 14, 2016
Merged

Conversation

dignifiedquire
Copy link
Member

@coveralls
Copy link

coveralls commented Dec 5, 2016

Coverage Status

Coverage remained the same at 99.614% when pulling 2d3352a on VictorBjelkholm:api-docs into d0faf10 on multiformats:master.

@victorb victorb force-pushed the api-docs branch 2 times, most recently from 1781cc1 to fe620e4 Compare December 9, 2016 12:16
@victorb victorb added needs review and removed status/in-progress In progress labels Dec 9, 2016
@victorb
Copy link
Member

victorb commented Dec 9, 2016

@dignifiedquire should be ok now, please leave feedback :)

Preview: https://victorbjelkholm.github.io/js-multiaddr/

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.614% when pulling 38f7c32 on VictorBjelkholm:api-docs into d0faf10 on multiformats:master.

@dignifiedquire
Copy link
Member Author

Cool stuff @victorbjelkholm, not super happy about this though:

screen shot 2016-12-09 at 13 40 20

which is not your fault, but this needs some work in the theme/parsing

@dignifiedquire
Copy link
Member Author

So it turns out the general notion of how to document this in jsdoc are one of the two following

Complex

Allows for individual property descriptions, but adds another section

/**
 * @typedef {Object} Protocols
 * @param {Array}  table
 * @param {Object} names
 * @param  {Object} codes - protocols
 */
/**
 * @returns {Protocols}
 */

Simple

Does not allow for description of individual properties

/**
 * @returns {{table: Array, names: Object, codes: Object}}
 */

@daviddias daviddias added status/deferred Conscious decision to pause or backlog status/in-progress In progress and removed status/deferred Conscious decision to pause or backlog labels Dec 9, 2016
@daviddias daviddias requested a review from victorb December 12, 2016 05:54
@victorb
Copy link
Member

victorb commented Dec 12, 2016

@diasdavid

diasdavid requested a review from VictorBjelkholm 5 hours ago

PR is from me, might be better for @dignifiedquire or you to review it :)

@victorb victorb removed their request for review December 12, 2016 10:45
@dignifiedquire
Copy link
Member Author

@victorbjelkholm could you update the return values to use one of the two variants I listed above please?

@victorb
Copy link
Member

victorb commented Dec 12, 2016

@dignifiedquire thanks, applied where applicable

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.614% when pulling f333899 on VictorBjelkholm:api-docs into d0faf10 on multiformats:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.614% when pulling f333899 on VictorBjelkholm:api-docs into d0faf10 on multiformats:master.

* @returns {Array.<Object>} protocols - All the protocols the address is composed of
* @returns {Number} protocols[].code
* @returns {Number} protocols[].size
* @returns {String} protocols[].name
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victorbjelkholm you missed this one :)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.614% when pulling bd27709 on VictorBjelkholm:api-docs into d0faf10 on multiformats:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.614% when pulling bd27709 on VictorBjelkholm:api-docs into d0faf10 on multiformats:master.

@dignifiedquire
Copy link
Member Author

LGTM

@dignifiedquire dignifiedquire merged commit 7adb9b4 into multiformats:master Dec 14, 2016
@dignifiedquire dignifiedquire removed the status/in-progress In progress label Dec 14, 2016
@dignifiedquire dignifiedquire changed the title [WIP] Awesome API Documentation Awesome API Documentation Dec 14, 2016
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

Successfully merging this pull request may close these issues.

4 participants