Test First · JSON Structure

Test First Mock Structure

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: 9 Required: 3
Behavior-Driven DevelopmentBest PracticesMethodologySoftware DesignSoftware DevelopmentTesting

MockServer is a JSON Structure definition published by Test First, describing 9 properties, of which 3 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id name base_url spec_source spec_format routes dynamic proxy_enabled created_at

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

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

Work with this as data

Every JSON Structure 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 json structure

4 MCP tools reach this
  • find_json_structuresBrowse and filter every JSON Structure 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 Structure
curl "https://apis.io/api/v1/json-structures/test-first-mock-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?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.