Spec0docsCLI 0.7.0

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 at mocks.spec0.io/m/<id>.
  • Self-hosted — docker compose up -d from the mock-server repo. Useful for air-gapped CI, local dev, or behind your VPN.

Sections

On the platform, a mock server is created against a published API — one per API, per team:

The Create Mock Server dialog, with an API selected from a dropdown, a name, and an optional description.
The API dropdown only lists APIs with a published spec — the spec is what the mock is generated from, so there's nothing to mock without one.
  • 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.
Was this helpful?

On this page