@sngular/api-mock-runner v1.0.1
Welcome to api-mock-runner 👋
Run multiple mock servers from one or more OpenAPI Specification.
Schemas can be provided from a remote origin (https:// or git@) or a local path.
Remote and circular references are allowed.
📘 Usage
You can use api-mock-runner in a three different ways. All of them starts a CLI guided journey:
1. NPX (No installation needed)
npx @sngular/api-mock-runner2. Globally
sudo npm install --global @sngular/api-mock-runnerTo use: type api-mock-runner in the terminal.
3. Current project dev dependency
npm i --save-dev @sngular/api-mock-runnerManual options
You could avoid CLI interaction by using api-mock-runner with flags.
To explore manual options, use -h flag:
npx @sngular/api-mock-runner -hUsage: api-mock-runner [options]
Options:
-o, --origin <origin> path or repo containing schemas
-s, --schema [schemaPaths...] path to schemas
-p, --port [ports...] port to serve each schema
-r, --run-config use saved config
-h, --help display help for commandResponse selection
The application will return the first response found in the schema by default. To use another existing response, use prefer header with the content statusCode=XXX in the request.
prefer: statusCode=500Architectural Decision Record (ADR)
Here you can find architectural decisions records
❤️ Special thanks
We would like to express our special thanks to open-api-mocker, which is used to set up a mock server.