API to generate and host swagger UI from documentation files
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
.gitignore
LICENSE
README.md
dev.js
index.js
package.json
yarn.lock

README.md

swaag 😎

Swagger UI server

When documentating APIs in swagger, using the online editor can cause troubles if we try to split documentation in multiple files.
swaag helps to easily host swagger-ui locally.

Note that it hosts swagger-ui, not swagger-editor. You must edit the swagger files on your local editor.

To use the CLI, see swaag-cli.

Install

$ npm install swaag

Usage

const swaag = require("swaag");

swaag({
  entryPoint: "./docs",
  watch: true
});

API

swaag([options])

options.entryPoint

Type: string
Default: docs/openapi.yaml in current directory

options.port

Type: string
Default: 3000

options.watch

Watches the directory of entryPoint

Type: boolean
Default: false

License

MIT © Sid Doshi