Test First · Schema

MockServer

A mock server configuration derived from a test-first specification, enabling consumers to develop against an API before the provider implements it.

Behavior-Driven DevelopmentBest PracticesMethodologySoftware DesignSoftware DevelopmentTesting

Properties

Name Type Description
id string Unique identifier for the mock server configuration.
name string Name of the mock server.
base_url string Base URL where the mock server is running.
spec_source string URL to the OpenAPI or other specification used to generate the mock.
spec_format string Format of the specification backing the mock.
routes array List of mock routes and their configured responses.
dynamic boolean Whether the mock generates responses dynamically from the spec schema.
proxy_enabled boolean Whether the mock can proxy to a real backend when available.
created_at string ISO 8601 timestamp when the mock was created.
View JSON Schema on GitHub

JSON Schema

test-first-mock-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/test-first/refs/heads/main/json-schema/test-first-mock-schema.json",
  "title": "MockServer",
  "description": "A mock server configuration derived from a test-first specification, enabling consumers to develop against an API before the provider implements it.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the mock server configuration."
    },
    "name": {
      "type": "string",
      "description": "Name of the mock server."
    },
    "base_url": {
      "type": "string",
      "format": "uri",
      "description": "Base URL where the mock server is running."
    },
    "spec_source": {
      "type": "string",
      "format": "uri",
      "description": "URL to the OpenAPI or other specification used to generate the mock."
    },
    "spec_format": {
      "type": "string",
      "enum": ["openapi", "postman", "pact", "raml", "api-blueprint"],
      "description": "Format of the specification backing the mock."
    },
    "routes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MockRoute"
      },
      "description": "List of mock routes and their configured responses."
    },
    "dynamic": {
      "type": "boolean",
      "description": "Whether the mock generates responses dynamically from the spec schema."
    },
    "proxy_enabled": {
      "type": "boolean",
      "description": "Whether the mock can proxy to a real backend when available."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the mock was created."
    }
  },
  "required": ["id", "name", "base_url"],
  "$defs": {
    "MockRoute": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string",
          "enum": ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"],
          "description": "HTTP method for this route."
        },
        "path": {
          "type": "string",
          "description": "URL path pattern for this route."
        },
        "status_code": {
          "type": "integer",
          "minimum": 100,
          "maximum": 599,
          "description": "HTTP status code returned by this mock route."
        },
        "response_body": {
          "description": "Fixed response body for this mock route."
        },
        "content_type": {
          "type": "string",
          "description": "Content-Type of the mock response."
        }
      },
      "required": ["method", "path", "status_code"]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/test-first-mock"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.