Reference
Type surface and API contracts. The tutorial is the place to start; this section is for lookup.
| Page | Covers |
|---|---|
| Builder | mockGroup<E>(), verbs, .data, .prefix, .done, direct body, ctx shorthands |
| Endpoints | EndpointHandle<T> (ListHandle / RecordHandle), dataFile, MockrServer |
| Handlers | Verb specs, req, ctx, responseSchema, scenarios, ctx.forward() |
| Query params | jsonParam / jsonArrayParam, factory |
| WebSocket | ws({...}), WsEndpoint, WsHandle, hooks, schemas |
| Middleware | logger / delay / auth / errorInjection, custom pre / post |
| Scenarios | Per-endpoint presets + named server states |
| Proxy & forward | Pass-through, ctx.forward() mutate-then-return |
| Verify | responseSchema + verify / --verify contract-drift checks |
| Recorder | Chrome extension, recorder.mocksDir, server file patching |
| CLI | --port / --proxy / --recorder / --verify / --tui |
| Config | MockrConfig shape, groups, top-level options |
handler()andendpoints()are deprecated — usemockGroup(). See MIGRATION.md.