OpenAPI Mock Server
Most OpenAPI mock servers stop at “return an example response from the schema.” FetchSandbox goes further: it generates a fully stateful sandbox from any OpenAPI 3.x spec, with persistent resources, lifecycle state machines, and real webhook events. No manual stub maintenance, no drift between spec and behavior.
The problem with most OpenAPI mock servers
Tools like Prism, Microcks, and others read your OpenAPI spec and serve example responses for each endpoint. That works for the easy case: you call GET /users/123 and get back a stub user. But run this test:
- POST a user → 201, returns
{ id: "u_1" } - GET /users/u_1 → does the user exist?
Most OpenAPI mock servers say no. They serve an example for GET /users/{id} that has nothing to do with what you posted. Your test passes because both responses happen to look reasonable — and then production breaks because the real API actually persisted the resource and your code did not handle the second read correctly.
We wrote a longer piece on this: stateful API sandbox vs mock server.
What FetchSandbox does differently
Auto-generated from spec
Upload an OpenAPI 3.x spec and a working sandbox is provisioned in 2 seconds — endpoints, schemas, auth, all derived.
Stateful by default
POST a resource and the next GET returns it. State persists across the whole session, not just one request.
Real webhook events
State machine transitions fire real webhook events you can replay into your handler.
No manual stubs
When the spec updates, the sandbox updates with it. No hand-maintained YAML, no config drift.
Auth from the spec
API keys, Bearer tokens, OAuth headers — all detected from the spec's securitySchemes block.
Scenarios and errors
Switch between happy path, payment declined, rate limited, and other scenarios without code changes.
Side-by-side
| Capability | Basic OpenAPI mock | FetchSandbox |
|---|---|---|
| Generates routes from OpenAPI | Yes | Yes |
| Returns example responses | Yes | Yes |
| State persists across requests | No | Yes |
| Lifecycle state machines (e.g. subscription) | No | Yes |
| Webhook events on state changes | No | Yes |
| Per-session isolation for CI | Sometimes | Yes |
| Pre-bundled spec catalog | No | Bundled |
| No manual stub maintenance | No | Yes |
FAQ
Which OpenAPI versions are supported?
OpenAPI 3.0, 3.1, and Swagger 2.0 (with auto-conversion). The bundled spec parser handles both YAML and JSON formats.
Do I need to write any config?
No. Upload the spec, get a sandbox. State machines, auth, and webhook events are auto-derived from the spec's structure. You can override defaults with optional config files.
What about $ref resolution?
Internal refs are resolved automatically. External refs and remote schemas need to be inlined or bundled with a tool like swagger-cli before uploading.
Can I use my own spec, not just the pre-bundled ones?
Yes. The 41 pre-bundled specs are popular APIs we've tested heavily. Upload any other OpenAPI 3.x spec and it gets the same treatment.
Generate a sandbox from your spec
No signup. Free tier — 3 sandboxes, 10,000 requests/month.
Open Dashboard