Mock server
Mock server
Self-hosted or platform-managed mock — variants, schema validation, CEL expressions.
Spec0's mock server interprets a published OpenAPI spec at request time. Endpoints, status codes, and response payloads come straight from the spec; no separate mock definition to keep in sync.
How to run it
- Platform-managed —
spec0 mock create --api my-api. One mock per API, hosted atmocks.spec0.io/m/<id>. - Self-hosted —
docker compose up -dfrom themock-serverrepo. Useful for air-gapped CI, local dev, or behind your VPN.
Sections
- Concepts — 4 pages on variants, validation, CEL.
- How-to — 3 task-shaped guides.
- Admin API reference — interactive Scalar console for the mock-server admin endpoints.