Test Specifications · Example Payload

Test Specification Openapi Example

Test specification for the Orders API v1, defining all required test cases for contract validation against the OpenAPI specification.

OrdersContract TestingOpenAPI

Test Specification Openapi Example is an example object payload from Test Specifications, with 11 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

idnameversiondescriptionscopeformattestCasesconformanceLevelstagscreatedmodified

Example Payload

test-specification-openapi-example.json Raw ↑
{
  "id": "spec-orders-api-v1",
  "name": "Orders API Test Specification",
  "version": "1.0.0",
  "description": "Test specification for the Orders API v1, defining all required test cases for contract validation against the OpenAPI specification.",
  "scope": {
    "name": "Orders API",
    "version": "v1",
    "specificationUrl": "https://api.example.com/openapi.json"
  },
  "format": "openapi",
  "testCases": [
    {
      "id": "tc-create-order-success",
      "name": "Create Order - Success",
      "description": "POST /orders with valid body returns 201 with order object.",
      "given": {
        "method": "POST",
        "path": "/orders",
        "headers": {
          "Content-Type": "application/json",
          "Authorization": "Bearer {token}"
        },
        "body": {
          "customerId": "cust-123",
          "items": [{ "productId": "prod-456", "quantity": 2 }]
        }
      },
      "expected": {
        "statusCode": 201,
        "headers": { "Content-Type": "application/json" },
        "schema": "#/components/schemas/Order"
      },
      "priority": "critical",
      "tags": ["Orders", "Create", "Happy Path"]
    },
    {
      "id": "tc-create-order-invalid",
      "name": "Create Order - Missing Required Fields",
      "description": "POST /orders with missing customerId returns 400 Bad Request.",
      "given": {
        "method": "POST",
        "path": "/orders",
        "headers": { "Content-Type": "application/json" },
        "body": { "items": [{ "productId": "prod-456", "quantity": 1 }] }
      },
      "expected": {
        "statusCode": 400,
        "schema": "#/components/schemas/ErrorResponse"
      },
      "priority": "high",
      "tags": ["Orders", "Validation", "Error Handling"]
    },
    {
      "id": "tc-get-order-success",
      "name": "Get Order - Success",
      "description": "GET /orders/{id} for existing order returns 200 with order object.",
      "given": {
        "method": "GET",
        "path": "/orders/{id}",
        "headers": { "Authorization": "Bearer {token}" }
      },
      "expected": {
        "statusCode": 200,
        "schema": "#/components/schemas/Order"
      },
      "priority": "critical",
      "tags": ["Orders", "Read", "Happy Path"]
    }
  ],
  "conformanceLevels": [
    {
      "level": "MUST",
      "description": "All critical priority test cases must pass before deployment."
    },
    {
      "level": "SHOULD",
      "description": "High priority test cases should pass for production readiness."
    }
  ],
  "tags": ["Orders", "Contract Testing", "OpenAPI"],
  "created": "2026-05-03",
  "modified": "2026-05-03"
}

Work with this as data

Every example 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 examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example 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 example
curl "https://apis.io/api/v1/examples/test-specification-openapi-example"
All examples
curl "https://apis.io/api/v1/examples?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.