yaml-route-doc
v0.1.1
Published
Document HTTP routes using yaml
Downloads
2
Maintainers
Readme
YAML Route Documenter
The main purpose of this package is:
- YAML in
- HTML out
Routes can either be documented for internal use, or for third parties (e.g. when documenting a REST API).
Quick start
Run the following commands:
> npm i -D yaml-route-documenter
> npx yaml-route-documenter --install
# Follow the instructions given by the install tool
Please make sure you add the output folder to your .gitignore
or equivalent.
By default this will be {root}/output
.
To generate the HTML use the command:
> npx yaml-route-documenter -c $PathToConfig
> yaml-route-documenter -c $PathToConfig # Drop the 'npx' when defining it as an npm script
Alternatively call it programmatically:
import * as documenter from "yaml-route-doc";
documenter.document("path/to/config.yml");
More Documentation
For more information about writing custom css please refer to the CSS Guide