Detecting Breaking OpenAPI 3.1 Field Removals & Type Mutations in CI/CD

Line-based git diff treats a 9,000-line OpenAPI 3.1 JSON reformatter identically to a deleted required response field. When a billing microservice merges an accidental integer -> string serializer change on amount_cents, strongly typed Go, Java, and Rust partner SDKs fail deserialization immediately in production.

Breaking Changes Caught3 Critical
Affected Partner Integrations42 Clients
Avg Remediation / Client3.5 hrs @ $145/h
Avoided Outage Cost$21,315.00

Worked Payments API Release Diff (v2.4.0 vs v2.5.0)

OpenAPI JSON Pointer v2.4.0 Contract v2.5.0 Candidate Impact & Classification
/v2/invoices/{id} GET 200 Required tax_breakdown.jurisdiction_code Property removed without deprecation Breaking response field removal
/v2/invoices/{id} amount_cents type: "integer" (int64) type: "string" (decimal text) Breaking wire-type mutation
DELETE /v2/webhooks/{id} HTTP 204 No Content endpoint Path operation deleted Breaking endpoint removal
Modeled Partner Incident Cost 42 integrations × 3.5 eng hrs $145.00/hr blended eng cost $21,315.00

Reproducible POST /api/v1/diff Request

{
  "domain": "openapi_dom",
  "baseline": "{\"openapi\":\"3.1.0\",\"paths\":{\"/v2/invoices/{id}\":{\"get\":{\"responses\":{\"200\":{\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"required\":[\"id\",\"amount_cents\",\"tax_breakdown\"],\"properties\":{\"id\":{\"type\":\"string\"},\"amount_cents\":{\"type\":\"integer\"},\"tax_breakdown\":{\"type\":\"object\"}}}}}}}}},\"/v2/webhooks/{id}\":{\"delete\":{\"responses\":{\"204\":{\"description\":\"Deleted\"}}}}}}",
  "actual": "{\"openapi\":\"3.1.0\",\"paths\":{\"/v2/invoices/{id}\":{\"get\":{\"responses\":{\"200\":{\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"required\":[\"id\",\"amount_cents\"],\"properties\":{\"id\":{\"type\":\"string\"},\"amount_cents\":{\"type\":\"string\"}}}}}}}}}}}"
}

Verified DiffProofReport Output

{
  "ok": true,
  "domain": "openapi_dom",
  "summary": "Blocked 3 breaking OpenAPI 3.1 regressions (removed tax_breakdown, integer->string amount_cents, deleted DELETE /v2/webhooks/{id}).",
  "total_delta_usd": 21315.0,
  "recoverable_overcharge_usd": 21315.0,
  "severity": "critical",
  "line_item_findings": [
    { "id": "oas-01", "category": "breaking_field_removal", "item": "GET /v2/invoices/{id} -> tax_breakdown", "baseline_value": "required object", "actual_value": "removed", "delta_usd": 7105.0, "severity": "critical", "claim_action": "Restore tax_breakdown or bump endpoint prefix to /v3/invoices" },
    { "id": "oas-02", "category": "breaking_type_drift", "item": "GET /v2/invoices/{id} -> amount_cents", "baseline_value": "integer", "actual_value": "string", "delta_usd": 7105.0, "severity": "critical", "claim_action": "Keep amount_cents integer and introduce additive amount_decimal string field" },
    { "id": "oas-03", "category": "endpoint_deleted", "item": "DELETE /v2/webhooks/{id}", "baseline_value": "204 operation", "actual_value": "absent", "delta_usd": 7105.0, "severity": "critical", "claim_action": "Reinstate DELETE handler with Sunset header for 90-day deprecation" }
  ],
  "reproducible_counterexamples": [
    { "item": "Partner Incident Model", "formula": "42 * 3.5 * 145.00", "expected": 0.0, "observed": 21315.0, "delta_usd": 21315.0 }
  ],
  "sha256_proof": "2424446c2b89cf6d0b3253d63778293f232ac45c75c679639dd5e6af00a8ed0e",
  "cache_hit": false,
  "verification": { "verified": true, "precision_usd": 0.01 },
  "billed_micros": 50000
}

Diff an OpenAPI 3.1 Spec Free Next: REST Enum Narrowing Audit · CI/CD MCP Hook