Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

swagging

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagging

Swagging is a tool that makes it easier to write and display the documentation of your API's. It runs a [Swagger Editor](https://swagger.io/tools/swagger-editor/) and [Swagger UI](https://swagger.io/tools/swagger-ui/) instances locally so that you can see

latest
Source
npmnpm
Version
0.9.1
Version published
Maintainers
1
Created
Source

SWAGGING

Swagging is a tool that makes it easier to write and display the documentation of your API's. It runs a Swagger Editor and Swagger UI instances locally so that you can see it as you make it.

Swagging is installed along with the project as a development dependency so you won't need any external tool to help you creating your API's docs.

Installation

$ npm i -D swagging

Quick Usage

  • Create a swagger.yaml file in the root of your project

  • Create a npm script in package.json

    "scripts": {
      "swagging": "swagging"
    }
    
  • Run the script

    $ npm run swagging
    

If everything goes well two new browser tabs will open displaying Swagger Editor and Swagger UI. If it doesn't, check for the console output, you may need to copy and paste the provided URLs.

Reference

$ swagging [options]    

As for now Swagging can understand two optional parameters:

  • swagger: Path for the Swagger file in YAML format. Default: ./swagger.yaml

  • ui-port: To specify the port of Swagger UI server. Default: 3010

Example

$ swagging --swagger ./docs/swagger.yml --ui-port 3011

Keywords

swagger

FAQs

Package last updated on 27 Mar 2019

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