New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

swagger-markdown

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-markdown

Create markdown API documentation from swagger file

latest
Source
npmnpm
Version
3.1.1
Version published
Weekly downloads
3.9K
47.82%
Maintainers
1
Weekly downloads
 
Created
Source

swagger-markdown

npm circle ci

CLI script to turn Swagger/OpenAPI specifications into Markdown files. Supports Swagger 2.0, OpenAPI 3.0.x, and OpenAPI 3.1.x. For 3.1, webhooks are included in the generated documentation.

The version 2.0 is a breaking change. The project was rewritten in typescript. Along with addressing multiple issues, it is more strict now with the openapi version. The --force-version flag is now obsolete and will be removed in a future release.

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.
  --force-version [Deprecated] Set the document version, ignore version provided in the yaml file. Use with caution.

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

Keywords

swagger

FAQs

Package last updated on 25 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts