@acos/swagger-markdown
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

swagger-markdown

To Do: Write a new documentations

npm circle ci

CLI script to turn swagger yaml into markdown files. Supports swagger 2.0 format only

see examples folder

Installation

npm install -g swagger-markdown

Usage

swagger-markdown [-h] [-v] -i [-o] [--skip-info]

Options:
  -h, --help      Show this help message and exit.
  -v, --version   Show program's version number and exit.
  -i , --input    Path to the swagger yaml file
  -o , --output   Path to the resulting md file
  --skip-info     Skip the title, description, version etc, whatever is in the info block.

Npx (requires no installation)

npx swagger-markdown -i ./basic-auth.yaml

Example

swagger-markdown -i path/to/swagger/file.yaml

By default it will create the new file within the same directory with the same name as swagger file but with .md extension. So, if swagger file is placed in project/api-doc/swagger.yaml the new file will be created as project/api-doc/swagger.md

You can also use it as a npm script in your package.json:

npm i --save-dev swagger-markdown
{
    "scripts": {
        "md-docs": "swagger-markdown -i path/to/swagger.yaml",
        //...
    }
}
npm run md-docs

Related

Readme

Keywords

Package Sidebar

Install

npm i @acos/swagger-markdown

Weekly Downloads

47

Version

1.0.1

License

MIT

Unpacked Size

50.2 kB

Total Files

52

Last publish

Collaborators

  • aadityachakravarty