Contour reads your OpenAPI and Swagger specs and spins up a functional mock server with realistic data in seconds.
Contour gives you a production-grade mock server that understands your API contract.
Reads your OpenAPI types, formats, and enums to produce data that actually matches your contract. No more mismatched mocks.
Fields named email, phone, city produce realistic values.
40+ smart field-name patterns built in.
In-memory store: POST creates, GET retrieves, PUT updates, DELETE removes. Full CRUD without a database.
POST, PUT, and PATCH bodies are validated against your schema. Invalid payloads get a proper
400 with error details.
Simulate 500 errors, slow responses, and flaky connectivity. Test how your app handles the real world.
Control array sizes, per-route delays, and deterministic seeding directly in your OpenAPI spec. Your contract, your rules.
Zero config files. Zero setup. Just your terminal ๐
Install Contour globally with npm or pnpm. One dependency, nothing else to configure.
Pass any OpenAPI spec โ local file or remote URL. Contour parses it, resolves references, and registers every endpoint.
Your frontend gets type-safe, realistic responses instantly. Names, emails, phone numbers โ
not John Doe.
Install the CLI globally or locally and you're good to go ๐
$ npm install -g @trillionclues/contour
| Command | Description |
|---|---|
contour start <spec> |
Start the mock server |
contour start --stateful |
Enable in-memory CRUD persistence |
contour start --deterministic |
Reproducible data for E2E tests |
contour start --delay 200-500 |
Simulate network latency |
contour start --error-rate 10 |
Random 500 failures |
contour cache list |
List cached specs |
contour cache clear |
Clear spec cache |