Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

yaml-route-doc

damymetzke5MIT0.1.1TypeScript support: included

Document HTTP routes using yaml

routing, documentation, yaml, automation

readme

YAML Route Documenter

Build and Run Tests ESLint Prettier

The main purpose of this package is:

  1. YAML in
  2. 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