penx / openapi-mock

Start a mock server from an OpenAPI/Swagger spec file
https://www.npmjs.com/package/openapi-mock
29 stars 7 forks source link
mock nodejs openapi stub swagger

OpenAPI Mock

CLI utility to start a mock server based upon a Swagger/OpenAPI JSON or YAML spec file.

Uses swagger-node-runner and sway.

Install

npm install -g openapi-mock

Usage

Usage: openapi-mock [options] <spec>

Options:

  -V, --version        output the version number
  -m, --mock <dir>     path to mock directory
  -c, --config <file>  path to config file
  -p, --port <n>       port to start the mock server on
  -h, --help           output usage information