-
Notifications
You must be signed in to change notification settings - Fork 62
Description
I'm failing to create the markdown from an api_data.json document that has an apiParam group value set. IE: @apiParam (URL) {String{1-64}} [foo=bar] foo bar
I've narrowed it down to the fact that the parameters iteration is hardcoded to the Parameter field that is the default name of the array if a group has not been set. I will update to iterate through the Object.keys() on the parameter obj and get a PR to you.
Error in the console:
throw err;
^
TypeError: ejs:23
21| <%-: data[group][sub][0].description | undef %>
22|
23| <%-: data[group][sub][0].type | upcase %> <%= data[group][sub][0].url %>
24|
25| <% if (data[group][sub][0].header && data[group][sub][0].header.fields.Header.length) { -%>
26| ### Headers
Cannot read property 'length' of undefined
at Object.keys.forEach.__stack.lineno (eval at (/usr/local/lib/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:237:14), :31:118)
at Array.forEach (native)
at eval (eval at (/usr/local/lib/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:237:14), :29:966)
at Array.forEach (native)
at eval (eval at (/usr/local/lib/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:237:14), :29:835)
at eval (eval at (/usr/local/lib/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:237:14), :41:21)
at /usr/local/lib/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:250:15
at Object. (/usr/local/lib/node_modules/apidoc-markdown/index.js:60:31)
at Module._compile (module.js:456:26)