0.1.2 • Published 6 years ago
swaag v0.1.2
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