What it is
Mock Servers let you stand up a lightweight HTTP server bound to localhost without leaving Ripple. Define method + path + status + JSON body responses, start the server, and use the base URL (http://127.0.0.1:{port}) in your HTTP requests.
- Route table — GET/POST/PUT/PATCH/DELETE/OPTIONS/HEAD or * (any method)
- Path parameters — /users/{id} with {id} substitution in response body
- Configurable status, delay (ms), and response headers
- Live request log — method, path, status, timestamp
- CORS enabled for browsers and Ripple's HTTP client
- Import from OpenAPI Design document
- Start Mock from Design Studio — one-click generate, save, and start
- Persist definitions in app settings (ripple_mock_servers)
How to open it
- Click the Mock Servers icon in the footer
- The full-screen Mock Servers panel opens
Create a definition
- Click New and name your server (e.g. Pet Store Mock)
- A default GET /api/example route is created
- Set port and start the server — base URL shown in the panel
Edit routes
| Column | Example |
|---|---|
| Method | GET, POST, or * |
| Path | /users/{id} |
| Status | 200, 404, 500 |
| Delay | 0–5000 ms |
| Body | JSON with {id} substitution |
| Headers | Content-Type: application/json |
OpenAPI import & Design Studio
- Import routes from an OpenAPI Design document in the Mock Servers panel
- From Design Studio: Start Mock — generate routes from the active spec, save, and launch in one click
- Useful for prototyping APIs before the backend exists
Testing against mocks
- Point collection variables like baseUrl to http://127.0.0.1:{port}
- Run Collection Runner or manual sends — live log shows each hit
- Cookie jar and auth work normally against mock URLs
rip mock (headless)
For CI pipelines, use rip mock to start and stop mock servers without the desktop UI. Definitions live at {ripple data}/mocks/{name}.json.
rip mock start my-api
rip run collection ./ci/smoke.json --env ./ci/staging.json
rip mock stop my-api- rip mock list — available mock definition names
- rip mock start my-api — start from my-api.json (default port 4010)
- rip mock status — running URL and route count
- rip mock stop my-api — stop the server
- Only one mock server runs at a time
Limitations
| Limitation | Notes |
|---|---|
| Cloud-hosted mocks | Local 127.0.0.1 only |
| Request-body matching | Routes match method + path only |
| Dynamic templates | Static bodies with {param} substitution only |
| Shared multi-instance | No Redis / Mockbin-style deployment |