Spec0docs
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-managedspec0 mock create --api my-api. One mock per API, hosted at mocks.spec0.io/m/<id>.
  • Self-hosteddocker compose up -d from the mock-server repo. 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.

On this page