RapiMock
Your OpenAPI spec as a server that remembers. RapiMock serves every operation of your spec, validates requests, checks tokens, and keeps what you create, so a POST shows up in the next GET. No code to write.
A Mock That Keeps What You Send
Point rapidoc mock at a spec. Each API is served under its own path on port 4010; with--stateful, records you create are there when you read or list them, until you reset.
Your frontend, your tests, <rapi-doc>'s Try and an MCP server can all call it, the way they will call the real API.
npm install -D @rapidoc/cli @rapidoc/mock
npx rapidoc mock openapi.yaml --stateful
curl -X POST localhost:4010/openapi/pets \
-H "Content-Type: application/json" -d '{"name":"Biscuit"}'
curl localhost:4010/openapi/pets # Biscuit is in the listChecked Like the Real API, Kept Like a Real One
A request that doesn't match the spec gets a 400 with the problems listed. A token is checked against your issuer, and a missing scope gets a 403, the way your API will answer.
What passes is kept: a POST adds a record that the next GET returns, until you reset with POST /__mock/reset. What it answers →
It Reads the Data Model Off Your Spec
Paths that share a schema and a shape become one resource, with its key and what each operation does to it. Fields such as ownerId link resources, so seeded pets belong to seeded owners. Where nothing fits, the operation stays static and answers with the spec's example. How it works →
See What the Mock Made of Your Spec

City Library, an example with a few gaps
- What it found. 13 operations, 3 resources and 30 seeded records, read off the spec.
- Lint. 22 warnings: responses without examples, parameters without descriptions, writes with no security.
- Needs review. One operation where the spec left a gap and the mock had to guess, with the reason.
- The same UI at
/__mock/uiwhilerapidoc mock --statefulruns, with the records it holds now.
The spec check runs in your browser: your own spec is not sent anywhere. Paste it, drop the file, or give its address.
More Than Canned Examples
State, worked out from the spec
It reads resources, keys and links off your paths and schemas, starts with generated records, and keeps what you create, change and delete.
Read moreA UI to look inside
See the records, what the mock does for every operation, and how sure it is. Reset the data or reseed it from the page.
Read moreTests in any language
Reset, read and load the data over HTTP, with a session per test so parallel tests never see each other's changes.
Read moreRequests and tokens checked
A bad request gets a 400 with the problems listed. OAuth tokens are verified against your issuer, scopes included.
Read moreYou can correct it
Where a spec doesn't show its data model, state it in a few lines of mock.config.yaml. Stale entries are reported, never ignored.
Check your spec first
rapidoc lint --stateful reports what the mock had to assume, at its place in the spec, before you run anything.
Parallel Tests, Separate Data
Send an X-Mock-Session header and a test gets its own copy of the seed data, made when it first writes. Reset, read and load the data over HTTP, from tests in any language. Sessions →
In the Page or as a Server
<rapi-doc> also has a mock inside the browser, for docs and demos. They are built for different work.
| In-browser mock | RapiMock | |
|---|---|---|
| Runs | Inside the page | As an HTTP server |
| Who can call it | The page itself: Try, <rapi-flow> | Anything: curl, your frontend, tests |
| Request validation | No | Yes |
| Token and scope checks | No | Yes |
| Remembers what you create | No | Yes, with --stateful |
| Best for | Docs and demos | Development and testing |
RapiMock reads the data model off the spec. It does that well for APIs with ids in the path and keys at the top of a record, and needs a few lines of config for other styles:see which, with examples.
How RapiMock Compares
RapiMock does one job: a mock that behaves like your API, from the spec alone, with its security and its data. Other tools do more in other places, such as recording traffic, other protocols or a hosted service, and the table says where.
| Capability | Prism | WireMock | Mockoon | Postman mocks | Microcks | |
|---|---|---|---|---|---|---|
| From the spec | ||||||
| Mock straight from the specPoint it at the spec; no stubs to write | OpenAPI 2.0, 3.0 and 3.1 | In WireMock CloudStubs by hand in open source | Imported, partly mapped | Through a generated collection | Needs examples in the spec | |
| Data from the schemasRealistic values where there is no example | Generated per fieldThe same on every run for a seed | Dynamic mode | Faker templates by hand | Once, at import | Faker variables by hand | Templates by hand |
| Request validationA bad request gets a 400 that says why | Parameters and bodies | Parameters and bodies | In WireMock Cloud | Not documented | Parameters only | |
| Tokens and OAuth scopesChecked against your issuer and the spec's security | JWTs verified, scopes checked401 or 403 as the real API would | Missing credentials only | Header rules by hand | Header rules by hand | Not documented | Header pattern only |
| State and tests | ||||||
| State between requestsWhat you create, you can read, change and delete | On its roadmap | An extensionOr WireMock Cloud Enterprise | CRUD routes you set up | Handlers you write | Scripts you write | |
| Separate data per testParallel tests do not see each other | No state | Not documented | Not documented | Not documented | Not documented | |
| Control APIReset, read and set the data from any language | Admin API | Admin API | Not documented | No state reset | ||
| A UI to look insideIts records and what each operation does | In WireMock Cloud | Logs in the desktop app | Logs and state | Web console | ||
| Latency and faults | A delay, and error responses on requestNo connection faults | Delays and connection faults | Latency | Delays, errors, chaos mode | Delays | |
| Beyond the spec | ||||||
| Record or proxy a real API | Proxy, no recording | Proxy, record and play back | Proxy and recording | Not documented | Proxy; HAR import | |
| GraphQL, gRPC or AsyncAPI | GraphQL and gRPC extensions | gRPC | All three | |||
| MCP for AI agentsAgents call the mocked API as tools | rapidoc mcp serve, pointed at the mock | WireMock Cloud Enterprise | Starts and stops mocks only | Mocks as MCP tools | ||
| License and hosting | ||||||
| License | MITNo paid tier | Apache 2.0 | Apache 2.0WireMock Cloud is commercial | MITPro and Enterprise are paid | ProprietaryWith a free plan | Apache 2.0 |
| Hosted URL a team sharesA managed service, nothing to run | Run it on your own server | Stoplight platform | WireMock CloudFree tier with limits | Enterprise | On every plan | Self-hosted |
Other products as described in their own documentation on November 23, 2026. Sources
- Prism: README and roadmap, Mocking, Request validation, Validation proxy, Stoplight pricing
- WireMock: WireMock Cloud vs. open source, Stateful behaviour, Simulating faults, Admin API, Record and playback, AI, Pricing
- Mockoon: OpenAPI compatibility, CRUD routes, Admin API, Recording, CLI and MCP command, Pricing
- Postman mocks: Mock servers, Matching algorithm, JavaScript mocks, Scenarios and behaviors, Pricing
- Microcks: OpenAPI conventions, Mock constraints, Stateful mocks, Dispatching, MCP endpoints
Products change. If a cell is out of date, open an issue with a link to the page that shows it, and we will fix the table.