Test First · Schema

TestFirstSpecification

A test-first specification document that defines expected behavior before implementation, serving as both a test and a specification.

Behavior-Driven DevelopmentBest PracticesMethodologySoftware DesignSoftware DevelopmentTesting

Properties

Name Type Description
id string Unique identifier for the specification.
title string Title of the specification.
description string Detailed description of the behavior being specified.
format string The format used to express the specification.
version string Version of the specification.
component string The software component or API this specification covers.
scenarios array Individual test scenarios defined in this specification.
status string Lifecycle status of the specification.
author string Author of the specification.
created_at string ISO 8601 timestamp when the specification was created.
tags array Tags for filtering and organizing specifications.
View JSON Schema on GitHub

JSON Schema

test-first-specification-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-specification-schema.json",
  "title": "TestFirstSpecification",
  "description": "A test-first specification document that defines expected behavior before implementation, serving as both a test and a specification.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the specification."
    },
    "title": {
      "type": "string",
      "description": "Title of the specification."
    },
    "description": {
      "type": "string",
      "description": "Detailed description of the behavior being specified."
    },
    "format": {
      "type": "string",
      "enum": ["gherkin", "openapi", "json-schema", "pact", "junit", "rspec", "jasmine"],
      "description": "The format used to express the specification."
    },
    "version": {
      "type": "string",
      "description": "Version of the specification."
    },
    "component": {
      "type": "string",
      "description": "The software component or API this specification covers."
    },
    "scenarios": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Scenario"
      },
      "description": "Individual test scenarios defined in this specification."
    },
    "status": {
      "type": "string",
      "enum": ["draft", "active", "deprecated"],
      "description": "Lifecycle status of the specification."
    },
    "author": {
      "type": "string",
      "description": "Author of the specification."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the specification was created."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Tags for filtering and organizing specifications."
    }
  },
  "required": ["id", "title", "format", "status"],
  "$defs": {
    "Scenario": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the scenario."
        },
        "given": {
          "type": "string",
          "description": "Precondition or initial context for the scenario."
        },
        "when": {
          "type": "string",
          "description": "The action or event that triggers the behavior."
        },
        "then": {
          "type": "string",
          "description": "The expected outcome or result."
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tags applied to this scenario."
        }
      },
      "required": ["name", "then"]
    }
  }
}

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-specification"
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.