
Spec-based mock servers: A working mock from your OpenAPI document
Publish a mock server from your OpenAPI documents without writing code. It validates requests, answers from your examples and schemas, and works on every plan.
6 posts

Publish a mock server from your OpenAPI documents without writing code. It validates requests, answers from your examples and schemas, and works on every plan.

APIGit has two types of mock server. Here is how they differ, when each one fits, and how to run both from one repository.

Spec-based mock servers validate each request against your OpenAPI document, return clear problem+json errors, and let clients pick a response with the Prefer header.

Keep a mock server or a document on one commit, or let it follow a branch. Run several versions from one commit, such as a pinned 2.1 next to a following next.

When examples from a spec are not enough, a code-based mock server runs your own Express.js routes from the repository: middleware, persistent state, built-in libraries, and the same scripts on your machine with the CLI.

Mock servers last published before November 9, 2024 ran on a platform that has been retired. This guide explains how to republish them: the new URL, importing libraries, and what to do on the Free plan.
Create a free workspace, add an OpenAPI file and a Markdown guide, and publish your first documentation site and mock server in minutes.
Free for individuals. No credit card.
$ npm install -g @apigit/cli$ apigit auth login$ apigit doc publish