Apidocjs document creation issue, warning : plugin

2019-09-03 07:50发布

问题:

I tried to create API documentation using apidocjs and i got issues while compiling project for creating apidoc using apidoc.json on project folder.

Code here :

~$ apidoc -i ./ -o apidoc/

And result

warning: parser plugin 'param' not found.
error:   Error: Can not read: apidoc.json, please check the format (e.g. missing comma).

Please anyone help me to fix this issue

Tags related to apidocjs.com

回答1:

Removing the apidoc destination folder as @Prasanth suggests will destroy your history if you are using the @apiVersion feature. The only way you could rebuild it is to go through and checkout each version, then run the apidoc. So, if you want to use versioning. This is not your answer.

You may have syntax issues or some other configuration issue. In my case, since updating I had some functions documented in javadoc style with @param... this used to be ignored but now throws the warning.



回答2:

~$  apidoc -i ./ -e apidoc/ -o apidoc/

when api document generates, it generates main.js file with @param. and as that @param will also be checked next time of generation, you can just skip that output directory and all are good to go.



回答3:

Issue is fixed for me as well, This error comes from the generated docs/main.js. Usually we should parse only necessary files, to generate this apiDoc.

I used -f .php in my command, like apidoc -f .php -i ./ -o ./. This is working like a miracle.



回答4:

I had the same proble. I'm using custom template and template folder was in the same location as my *.js files which are parsed including main.js template file. -e option did not worked for me so I moved template folder to other location and everything works fine.



回答5:

I had the same issue in rebar using erlang and what I did was in the project root folder:

rm -rf doc/

then I run again apidoc

info: Done