Document the following in /server/api/achievement/achievement.controller.js
index controller method
show controller method
create controller method
update controller method
destroy controller method
Notes
Run npm run apidoc to generate the documentation
View the generated documentation by opening /docs/index.html
Generated documentation won't be committed to the repository - don't worry if you don't see a lot of changes in your working tree.
We'll be using APIDoc.js to auto-generate documentation from our source code. Please replicate the following example for each method in the controller
/**
* @api {get} /api/achievements Index
* @apiName index
* @apiGroup Achievements
* @apiDescription Get list of Achievements
* @apiPermission public
* @apiSuccess {Collection} root Collection of all active Observatory Achievements.
* @apiError (500) UnknownException Could not retrieve Achievement collection
*/
module.exports.index = function (req, res) { }
Document the following in
/server/api/achievement/achievement.controller.js
index
controller methodshow
controller methodcreate
controller methodupdate
controller methoddestroy
controller methodNotes
npm run apidoc
to generate the documentation/docs/index.html
We'll be using APIDoc.js to auto-generate documentation from our source code. Please replicate the following example for each method in the controller