Apidoc: Error: param.forEach is not a function

Created on 1 Oct 2015  路  7Comments  路  Source: apidoc/apidoc

Hey! I've just started trying to integrate some comments into my restify API and I'm unable to build the actual docs. I ran "apidoc -e node_modules" and after all my files are inspected I get this error. It looks like it might be internal, or I'm doing something wrong. Any help?

error: params.forEach is not a function
debug: TypeError: params.forEach is not a function
at /usr/local/lib/node_modules/apidoc/node_modules/apidoc-core/lib/workers/api_param_title.js:77:24
at Array.forEach (native)
at /usr/local/lib/node_modules/apidoc/node_modules/apidoc-core/lib/workers/api_param_title.js:74:33
at Array.forEach (native)
at /usr/local/lib/node_modules/apidoc/node_modules/apidoc-core/lib/workers/api_param_title.js:68:20
at Array.forEach (native)
at Object.postProcess (/usr/local/lib/node_modules/apidoc/node_modules/apidoc-core/lib/workers/api_param_title.js:67:17)
at /usr/local/lib/node_modules/apidoc/node_modules/apidoc-core/lib/worker.js:95:20
at /usr/local/lib/node_modules/apidoc/node_modules/lodash/index.js:3159:15
at baseForOwn (/usr/local/lib/node_modules/apidoc/node_modules/lodash/index.js:2089:14)

Most helpful comment

I figured out the problem! It was that I had '.' in some group names. For example:
@apiParam (user.save) {String} user

All 7 comments

Can you add --debug and check / post the output.

Sorry this is the end of the --debug output

Here's a link to a gist with the entire output: https://gist.github.com/brunerson/0104a1e80de0ddaadd89

Did you use somewhere the deprecated apiParamTitle ?
You should use instead apiDefine to the define a title:

/**
  * @apiDefine TitleName Some title text
  */

/**
 * @api ....
 * @apiParam (TitleName) {String} var Some description.
 */

No I didn't... I used apiDefine and apiParam. I'm not sure what's going on!

I figured out the problem! It was that I had '.' in some group names. For example:
@apiParam (user.save) {String} user

Thanks for your help @rottmann !!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Znarkus picture Znarkus  路  7Comments

Jimbolino picture Jimbolino  路  6Comments

WilsonFpz picture WilsonFpz  路  5Comments

brandonhamilton picture brandonhamilton  路  4Comments

gemal picture gemal  路  4Comments