This package has been deprecated

Author message:

GitLab Open API Viewer is recommended.

swagger-dir

2.0.1 • Public • Published

swagger-dir CLI

A Swagger.io Directory Browser

Please read the documentation on the official site: https://github.com/VdustR/swagger-dir/tree/master/packages/cli

More info

Install

npm i -g swagger-dir
yarn global add swagger-dir

Usage

Usage: swagger-dir [options]

A Swagger.io Directory Browser

Options:
  -V, --version                                output the version number
  -d, --dir <dir>                              Swagger files directory
  -m, --mode <mode>                            Default: production
  -s, --swagger-ui-options <swaggerUiOptions>  a JSON format swagger UI options
  -u, --public-url <publicUrl>                 Public URL for gateway. Default: /
  -p, --port <port>                            Default: 3000
  -l, --log-level <logLevel>                   debug: 0, info: 1, warn: 2, error: 3, none: 4. Default: 1
  -h, --help                                   display help for command

For example:

# browse current directory
swagger-dir
# browse specific directory
swagger-dir -d /path/to/my/swagger/files/folder
# you can also use npx to execute it without installing it
npx swagger-dir

Docker

Pull the image:

docker pull vdustr/swagger-dir:latest

Run the container:

docker run --rm --name swagger-dir -it -v /swagger-ui/files/path:/data -p 80:3000 vdustr/swagger-dir:latest

If the file updated events were not detected, please pass the environment variable CHOKIDAR_USEPOLLING=true:

docker run --rm --name swagger-dir -it -v /swagger-ui/files/path:/data -p 80:3000 -e CHOKIDAR_USEPOLLING=true vdustr/swagger-dir:latest

Check chokidar#performance for more information.

Build Locally

docker build -t "vdustr/swagger-dir:latest" .

Package Sidebar

Install

npm i swagger-dir

Weekly Downloads

2

Version

2.0.1

License

MIT

Unpacked Size

9.79 kB

Total Files

5

Last publish

Collaborators

  • vdustr