Git Product home page Git Product logo

swagger-markdown's Introduction

swagger-markdown

npm dependencies 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

swagger-markdown's People

Contributors

crrobinson14 avatar dependabot[bot] avatar ffflorian avatar grdlok avatar greenkeeperio-bot avatar hungrysergii avatar jerska avatar lazydevorg avatar lecstor avatar skorokhodov avatar snyk-bot avatar syroegkin avatar tamlyn avatar thebenforce avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.