-
Notifications
You must be signed in to change notification settings - Fork 69
docs: add JSDocs for top level API objects #140
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
Conversation
I didn't mark this as "Fixes" for #130 since I think we should discuss what the actual exposed API should be before we determine what constitutes acceptable documentation for end users. I think once a version agnostic emitter is available, that should be exposed at the top level as well, and everything else should be removed from the public facing API. What else besides the |
I've added automatic doc generation. You can see how it will look on my fork here: http://lanceball.com/sdk-javascript/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lance I found only a few minor typos, some phrases and paragraphs are terminated with period and others don`t.
This commit add JSDoc documentation to the CloudEvent and HTTPReceiver objects exposed by the API when using the top level imports, specifically `CloudEvent` and `HTTPReceiver`. This adds a `generate-docs` npm script to generate site and API documentation for GitHub pages in `./docs`. Signed-off-by: Lance Ball <[email protected]>
@helio-frota changes applied. Would you mind refreshing your review? Thanks. |
/** | ||
* Adds an extension attribute to this CloudEvent | ||
* @see https://github.com/cloudevents/spec/blob/master/spec.md#extension-context-attributes | ||
* @param {*} key the name of the exteneion attribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lance seems the typo was fixed in code but the generated docs needs to be updated again ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a blocker since it will be updated along time anyway 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh shoot - thanks. I'll update before landing this.
This commit adds JSDoc documentation to the
CloudEvent
andHTTPReceiver
objects exposed by the API when using the top level imports.
Ref: #130
Ref: #9
Creating as a draft PR because I'd still like to add docs generation for hosting on GitHub pages.
Signed-off-by: Lance Ball [email protected]