1

Ok, so I'm playing around with apidocjs to figure it out before implementing it in a production environment and am incountering the following:

~/apidoc_playground$ apidoc
warn: parser plugin 'param' not found in block: 0
info: Done.

the following are the block comments it is looking at (each in a separate file):

/**
*this is a test of apidocjs
*@api {get} /user/:id Request User information
* @apiName GetUser
* @apiGroup User
*
* @apiParam {Number} id Users unique ID.
*
* @apiSuccess {String} firstname Firstname of the User.
* @apiSuccess {String} lastname  Lastname of the User.
*
*/

/**
 *@api {GET} /getPicture/:UID Retreive user profile picture
 *@apiGroup User
 *@apiName getPicture
 *@apiVersion 0.0.1
 *
 *@apiDescription userID goes in, picture comes out, you can't explain that!
 *@apiParam {int} UID User's identification number.  
 *@apiExample {curl} Example usage:
 *      curl -i http://api.example.com/getPicture/45123
 *@apiSuccess (200) {json} picture The user's profile picture
 *@apiError (4xx) {userNotFound} UID There was no user affiliated with the given id.
 *@apiErrorExample {json} Error-Response:
 *      HTTP/1.1 404 Not Found
 *      {
 *              "error":"UserNotFound"
 *      }
 */

What i know already :

This does not cause the update to fail, apidoc updates the output directory as intended.

If i delete the output directory before calling apidoc, there is no warning.

the warning still occurs if it has no files to parse.

after scouring for an answer the most i can find is one question that is similar to mine except that the asker also has format errors in his apidoc.json. That being said, the answers in that thread don't really meet what i'm looking for (one being delete the output folder before calling apidoc, and the other being don't delete the output folder if you want to keep history and maybe you have format errors).

Any insights from more experienced users of apidocjs would be appriciated.

sorry for the wall-of-text

  • Do you know how to only scan specific files? for example if you have a folder with 100 .js files and you only want to scan server.js and app.js from it do you know how to go about it? – user1010101 Jun 16 '15 at 13:32

1 Answers1

0

If it happens even when both the input and output directories are empty, that indicates there's probably something wrong with the install.

Try to wipe and re-add it.

npm remove -g apidoc
npm install -g apidoc
Evan Plaice
  • 13,944
  • 6
  • 76
  • 94