-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add and serve apiDoc documentation (for Tags) #70
Comments
Api Doc generates a handlebars template which is supposed to be dynamically filled in at client side by script tag functions, but they are blocked by CSP policies of browsers.That's why we cannot directly serve the Docs generated by apidoc from express.Should we try to change to another doc generating library? |
apidoc generates HTML/CSS/JS tho, not handlebars |
The issue was with helmet middleware CSP used,fixed it. |
Github: apiDoc
package.json
scriptdocs
which will generate the documentation into a folder,docs/
/api/docs
Documentation can include the following annotations:
@api
for method, route, and 1 line description@apiName
for naming a route (GetTagList, GetTagBySlug)@apiDescription
, if required, for special routes or special notes.@apiGroup
for each resource (Tag)@apiParam
for the fields which can be passed in body or filter.@apiPermission
, first use@apiDefine
in auth middleware to define the user permission model, then use that in authRequired routes.@apiSuccess
to define the fields in response document.Avoid
@apiError
and@apiHeader
for now.The text was updated successfully, but these errors were encountered: