Head over to https://github.com/rigwild/apidoc-markdown for a an up to date version.
martinj / node-apidoc-markdown Goto Github PK
View Code? Open in Web Editor NEWGenerate API documentation in markdown from apidoc data
Generate API documentation in markdown from apidoc data
Head over to https://github.com/rigwild/apidoc-markdown for a an up to date version.
The markdown is not displaying the default values for parameters. PR incoming.
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)
This repository is not maintained, it contains highly vulnerable dependencies (EJS very old version), old JavaScript syntax and no new features (including new apiDoc specs).
I updated all of this in my fork. I'm willing to maintain it, adding new features and answer to issues/PR.
I suggest that this repository transfer ownership or mention the updated version in the README.
@martinj
Love the work!
Hi,
It's been a year since you set the notice to go to the forked version, thanks again. It is still maintained as of now.
Would you agree to transfer your npm package to me ? It would help to get my version more used.
If you are ok, I will do the following:
See https://docs.npmjs.com/transferring-a-package-from-a-user-account-to-another-user-account.
Thanks!
Since the handling of various versions of endpoints doesn't seem to work, adding a cli api version parameter that allows only that api version to have markdown created.
Template Literal is fastest, smallest and simplest template engine, because it use JS's literal template feature.
It's 55 times faster than EJS, and it also use less CPU and RAM ressources, so it may be a good idea to use it instead of EJS ๐
With API documentation that is larger, the documentation runs long and going back to the top by scrolling sucks. Add link to go back to the top for each endpoint. PR incoming
I get an error
apidoc-markdown -p . -o text.rd
undefined:25
throw err;
^
TypeError: ejs:30
28| <%-: data[group][sub][0].type | upcase %> <%= data[group][sub][0].url %>
29| ```
30|
31| <% if (data[group][sub][0].header && data[group][sub][0].header.fields.Header.length) { -%>
32| ### Headers
33|
xdl
Cannot convert undefined or null to object
at Function.keys ()
at eval (eval at exports.compile (C:\Users\name\AppData\Roaming\npm\node_modules\apidoc-markdown\node_modules\ejs\lib\ejs.js:237:14), :32:114)
at Array.forEach ()
at eval (eval at exports.compile (C:\Users\name\AppData\Roaming\npm\node_modules\apidoc-markdown\node_modules\ejs\lib\ejs.js:237:14), :30:1192)
at Array.forEach ()
at eval (eval at exports.compile (C:\Users\name\AppData\Roaming\npm\node_modules\apidoc-markdown\node_modules\ejs\lib\ejs.js:237:14), :30:964)
at eval (eval at exports.compile (C:\Users\name\AppData\Roaming\npm\node_modules\apidoc-markdown\node_modules\ejs\lib\ejs.js:237:14), :46:21)
at C:\Users\name\AppData\Roaming\npm\node_modules\apidoc-markdown\node_modules\ejs\lib\ejs.js:250:15
at Object. (C:\Users\name\AppData\Roaming\npm\node_modules\apidoc-markdown\index.js:88:31)
at Module._compile (module.js:643:30)
Is this project still active? If not can you update the readme to point to my fork...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.