2.0.1 • Published 4 years ago

swagger-dir v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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" .
2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.2.2

4 years ago

0.1.7

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago