2

I been playing with APIdoc.js for the past few days and I can't seem to figure out how to make versioning work. I understand I need to save my old APIDOC comment code into another file with @APIVersioning on the new / old code according to APIDOC. No matter where I stick this old file I can't seem to get it to work and there isn't any hinting in this example about how its loading the old code to create this versioning. Any assisted will be greatly appreciated.

Joshua Dalley
  • 339
  • 3
  • 6
  • 23

2 Answers2

9

Suppose you have already created the documentation of a file, say File1.php. Now if any changes in some parameters or perhaps anything are required to be made in the File1.php, then simply copy the current documentation of that file in _apidoc.js and make the necessary changes.

Generate the documentation of the File1.php again, and BOOOM you now have two versions of your documentation .

Please make sure of the following :

1) Put the @apiVersion tag with different values in both the versions.

2) _apidoc.js should be in the same directory where File1.php is present.

lazy rabbit
  • 1,076
  • 3
  • 11
  • 29
3

The information regarding this on http://apidocjs.com/ could be more specific. After some experimentation I found that you just have to put _apidoc.js (if you follow the examples) the same folder as the rest of your files. So if you run it with the example command:

apidoc -i myapp/ -o apidoc/ -t mytemplate/

Then _apidoc.js needs to be in myapp/.

Bo12s
  • 31
  • 3