{
 "openapi": "3.1.0",
 "info": {
  "title": "Commercial.Mortgage API",
  "version": "1.1.0",
  "summary": "Commercial mortgage program rules, indicative rates, a program matcher and live index rates.",
  "description": "Free, read-only, no key. Program figures come from verified primary sources (each with a fact id, as-of date and source URL); indicative rates are a live index reading plus each program's published spread. Indications and published limits, not quotes or offers to lend. Compilation licensed CC BY 4.0: credit \"Data: Commercial.Mortgage (commercial.mortgage)\" with a link. SOFR is subject to the New York Fed terms of use.",
  "contact": {
   "name": "Janover Capital LLC",
   "email": "hello@commercial.mortgage",
   "url": "https://commercial.mortgage/developers/"
  },
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  }
 },
 "servers": [
  {
   "url": "https://commercial.mortgage"
  }
 ],
 "externalDocs": {
  "url": "https://commercial.mortgage/developers/",
  "description": "Developer and MCP guide"
 },
 "paths": {
  "/api/programs": {
   "get": {
    "operationId": "listPrograms",
    "summary": "Every program with its published limits and today's indicative rate",
    "description": "Filters never exclude a program for a limit it does not publish. Edge-cached about 15 minutes. CORS open.",
    "parameters": [
     {
      "name": "property",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "multifamily",
        "small-multifamily",
        "mixed-use",
        "retail",
        "office",
        "industrial",
        "self-storage",
        "manufactured-housing",
        "hotel",
        "medical-office",
        "senior-housing",
        "student-housing",
        "affordable-housing",
        "special-purpose",
        "owner-occupied",
        "land"
       ]
      },
      "description": "Eligible property type."
     },
     {
      "name": "purpose",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "purchase",
        "refinance",
        "cash-out",
        "construction",
        "bridge",
        "renovation"
       ]
      },
      "description": "Loan purpose."
     },
     {
      "name": "family",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "bank",
        "agency",
        "fha",
        "life-company",
        "cmbs",
        "bridge",
        "construction",
        "non-bank",
        "subordinate",
        "sba",
        "specialty"
       ]
      },
      "description": "Program family."
     },
     {
      "name": "lender_type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "bank",
        "credit-union",
        "agency",
        "fha",
        "life-company",
        "cmbs",
        "debt-fund",
        "non-bank",
        "sba",
        "private",
        "multiple",
        "c-pace"
       ]
      },
      "description": "Lender type."
     },
     {
      "name": "recourse",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "non-recourse",
        "partial",
        "full",
        "varies"
       ]
      },
      "description": "Recourse type."
     },
     {
      "name": "loan_amount",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "minimum": 1
      },
      "description": "Drop programs whose published size range excludes this loan (USD)."
     }
    ],
    "responses": {
     "200": {
      "description": "Programs",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProgramList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/programs/{slug}": {
   "get": {
    "operationId": "getProgram",
    "summary": "One program's rules and today's indicative rate",
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "agency-supplemental-loans",
        "bank-commercial-mortgage",
        "bridge-loans",
        "c-pace-financing",
        "cmbs-conduit-loans",
        "construction-loans",
        "credit-tenant-lease-financing",
        "credit-union-commercial-loans",
        "debt-fund-loans",
        "dscr-commercial-loans",
        "fannie-mae-multifamily-loans",
        "fannie-mae-small-loans",
        "fha-221d4-loans",
        "fha-223a7-loans",
        "fha-223f-loans",
        "freddie-mac-optigo-loans",
        "freddie-mac-small-balance-loans",
        "hard-money-commercial-loans",
        "hud-232-loans",
        "land-loans",
        "leasehold-financing",
        "life-company-loans",
        "mezzanine-loans",
        "owner-occupied-commercial-mortgage",
        "portfolio-and-blanket-loans",
        "preferred-equity",
        "sasb-loans"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Program",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "program": {
           "$ref": "#/components/schemas/Program"
          },
          "index": {
           "type": "object"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/match": {
   "get": {
    "operationId": "matchPrograms",
    "summary": "Rank the programs that fit a deal (the /find-your-loan/ matcher)",
    "description": "Returns ranked first-mortgage programs with reasons, cautions, indicative rate and a max-loan estimate; layers (mezzanine, preferred equity, C-PACE); programs ruled out with the reason; and the rules applied. Nothing is stored.",
    "parameters": [
     {
      "name": "property",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "multifamily",
        "mixed-use",
        "retail",
        "office",
        "medical-office",
        "industrial",
        "self-storage",
        "manufactured-housing",
        "hotel",
        "senior-housing",
        "student-housing",
        "affordable-housing",
        "special-purpose",
        "land"
       ]
      },
      "description": ""
     },
     {
      "name": "units",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "description": "Apartment units (multifamily). 1 to 4 units are outside commercial programs."
      },
      "description": "Apartment units (multifamily). 1 to 4 units are outside commercial programs."
     },
     {
      "name": "purpose",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "purchase",
        "refinance",
        "cash-out",
        "construction",
        "bridge",
        "renovation"
       ]
      },
      "description": ""
     },
     {
      "name": "loan_amount",
      "in": "query",
      "required": true,
      "schema": {
       "type": "number",
       "minimum": 1,
       "description": "Loan wanted, USD."
      },
      "description": "Loan wanted, USD."
     },
     {
      "name": "value",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "description": "Property value or price, USD (LTV test)."
      },
      "description": "Property value or price, USD (LTV test)."
     },
     {
      "name": "cost",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "description": "Total project cost, USD (LTC test, construction)."
      },
      "description": "Total project cost, USD (LTC test, construction)."
     },
     {
      "name": "noi",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "description": "Annual net operating income, USD (DSCR and debt-yield tests)."
      },
      "description": "Annual net operating income, USD (DSCR and debt-yield tests)."
     },
     {
      "name": "occupancy",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "stabilized",
        "transitional",
        "vacant"
       ],
       "default": "stabilized"
      },
      "description": ""
     },
     {
      "name": "credit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "strong",
        "fair",
        "challenged"
       ],
       "default": "strong"
      },
      "description": ""
     },
     {
      "name": "timeline",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "urgent",
        "soon",
        "normal",
        "flexible"
       ],
       "default": "flexible",
       "description": "urgent = under 30 days, soon = 30 to 60, normal = 60 to 90."
      },
      "description": "urgent = under 30 days, soon = 30 to 60, normal = 60 to 90."
     },
     {
      "name": "recourse",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "required",
        "preferred",
        "any"
       ],
       "default": "any",
       "description": "Non-recourse required, preferred, or any."
      },
      "description": "Non-recourse required, preferred, or any."
     },
     {
      "name": "existing_loan",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "none",
        "agency",
        "fha",
        "other",
        "unknown"
       ],
       "default": "unknown"
      },
      "description": ""
     },
     {
      "name": "existing_balance",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "description": "Existing first-loan balance, USD. Supplemental loans are sized on combined debt and need it."
      },
      "description": "Existing first-loan balance, USD. Supplemental loans are sized on combined debt and need it."
     },
     {
      "name": "existing_payment",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "description": "Existing first-loan monthly payment, USD (combined coverage test on a supplemental loan)."
      },
      "description": "Existing first-loan monthly payment, USD (combined coverage test on a supplemental loan)."
     },
     {
      "name": "owner_occupied",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean"
      },
      "description": ""
     },
     {
      "name": "ground_lease",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean"
      },
      "description": ""
     },
     {
      "name": "credit_tenant",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean"
      },
      "description": ""
     },
     {
      "name": "multiple_properties",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean"
      },
      "description": ""
     }
    ],
    "responses": {
     "200": {
      "description": "Matches",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/MatchResult"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "matchProgramsPost",
    "summary": "Same as GET, with the deal as a JSON body (not cached)",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "property",
         "purpose",
         "loan_amount"
        ],
        "properties": {
         "property": {
          "type": "string",
          "enum": [
           "multifamily",
           "mixed-use",
           "retail",
           "office",
           "medical-office",
           "industrial",
           "self-storage",
           "manufactured-housing",
           "hotel",
           "senior-housing",
           "student-housing",
           "affordable-housing",
           "special-purpose",
           "land"
          ]
         },
         "units": {
          "type": "integer",
          "minimum": 1,
          "description": "Apartment units (multifamily). 1 to 4 units are outside commercial programs."
         },
         "purpose": {
          "type": "string",
          "enum": [
           "purchase",
           "refinance",
           "cash-out",
           "construction",
           "bridge",
           "renovation"
          ]
         },
         "loan_amount": {
          "type": "number",
          "minimum": 1,
          "description": "Loan wanted, USD."
         },
         "value": {
          "type": "number",
          "description": "Property value or price, USD (LTV test)."
         },
         "cost": {
          "type": "number",
          "description": "Total project cost, USD (LTC test, construction)."
         },
         "noi": {
          "type": "number",
          "description": "Annual net operating income, USD (DSCR and debt-yield tests)."
         },
         "occupancy": {
          "type": "string",
          "enum": [
           "stabilized",
           "transitional",
           "vacant"
          ],
          "default": "stabilized"
         },
         "credit": {
          "type": "string",
          "enum": [
           "strong",
           "fair",
           "challenged"
          ],
          "default": "strong"
         },
         "timeline": {
          "type": "string",
          "enum": [
           "urgent",
           "soon",
           "normal",
           "flexible"
          ],
          "default": "flexible",
          "description": "urgent = under 30 days, soon = 30 to 60, normal = 60 to 90."
         },
         "recourse": {
          "type": "string",
          "enum": [
           "required",
           "preferred",
           "any"
          ],
          "default": "any",
          "description": "Non-recourse required, preferred, or any."
         },
         "existing_loan": {
          "type": "string",
          "enum": [
           "none",
           "agency",
           "fha",
           "other",
           "unknown"
          ],
          "default": "unknown"
         },
         "existing_balance": {
          "type": "number",
          "description": "Existing first-loan balance, USD. Supplemental loans are sized on combined debt and need it."
         },
         "existing_payment": {
          "type": "number",
          "description": "Existing first-loan monthly payment, USD (combined coverage test on a supplemental loan)."
         },
         "owner_occupied": {
          "type": "boolean"
         },
         "ground_lease": {
          "type": "boolean"
         },
         "credit_tenant": {
          "type": "boolean"
         },
         "multiple_properties": {
          "type": "boolean"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Matches",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/MatchResult"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/rates": {
   "get": {
    "operationId": "getIndexRates",
    "summary": "Newest reading of the index series this site prices from (UST5, UST7, UST10, SOFR, SOFR30, PRIME)",
    "responses": {
     "200": {
      "description": "Index readings with dates and week-ago values",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "fetched_at": {
           "type": "string",
           "format": "date-time"
          },
          "series": {
           "type": "object",
           "additionalProperties": {
            "$ref": "#/components/schemas/Reading"
           }
          }
         }
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/live": {
   "get": {
    "operationId": "getLiveSeries",
    "summary": "Any portfolio series by id, with week-ago and month-ago points and optional history",
    "parameters": [
     {
      "name": "ids",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "example": "UST10,SOFR"
      },
      "description": "Comma-separated series ids."
     },
     {
      "name": "history",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 0,
       "maximum": 400
      },
      "description": "Days of daily history to include."
     }
    ],
    "responses": {
     "200": {
      "description": "Series",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/mcp": {
   "post": {
    "operationId": "mcp",
    "summary": "Model Context Protocol server (Streamable HTTP, JSON-RPC 2.0)",
    "description": "Tools: size_loan, get_rates_by_lender_type, get_spreads_by_property_type, get_index_rates, match_programs, program_rules, compare_programs, get_rates, prepayment_estimate. Discovery: /.well-known/mcp.json.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "jsonrpc",
         "method"
        ],
        "properties": {
         "jsonrpc": {
          "const": "2.0"
         },
         "id": {},
         "method": {
          "type": "string",
          "example": "tools/list"
         },
         "params": {
          "type": "object"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "JSON-RPC response",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/embed/rates": {
   "get": {
    "operationId": "embedRates",
    "summary": "Rate ticker as server-rendered HTML for an iframe",
    "parameters": [
     {
      "name": "ids",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "example": "UST10,SOFR"
      },
      "description": "Up to eight series ids."
     },
     {
      "name": "theme",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "light",
        "dark"
       ]
      },
      "description": "Color theme."
     }
    ],
    "responses": {
     "200": {
      "description": "HTML",
      "content": {
       "text/html": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  },
  "/data/programs.json": {
   "get": {
    "operationId": "programsFile",
    "summary": "The program rules file at build time (what the matcher and APIs read)",
    "responses": {
     "200": {
      "description": "Rules file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/data/downloads/manifest.json": {
   "get": {
    "operationId": "downloadsManifest",
    "summary": "The CSV and JSON spread tables, with sources and columns",
    "responses": {
     "200": {
      "description": "Manifest",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Error": {
    "type": "object",
    "properties": {
     "ok": {
      "const": false
     },
     "error": {
      "type": "string"
     },
     "errors": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    }
   },
   "Reading": {
    "type": "object",
    "properties": {
     "value": {
      "type": "number"
     },
     "date": {
      "type": "string",
      "format": "date"
     },
     "week": {
      "type": [
       "object",
       "null"
      ]
     },
     "status": {
      "type": [
       "string",
       "null"
      ]
     }
    }
   },
   "Fact": {
    "type": "object",
    "description": "A verified figure and where it comes from.",
    "properties": {
     "id": {
      "type": "string"
     },
     "value": {},
     "unit": {
      "type": [
       "string",
       "null"
      ]
     },
     "display": {
      "type": "string"
     },
     "as_of": {
      "type": "string"
     },
     "source": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "Rate": {
    "type": [
     "object",
     "null"
    ],
    "properties": {
     "lo": {
      "type": "number"
     },
     "hi": {
      "type": "number"
     },
     "index": {
      "type": "string"
     },
     "index_value": {
      "type": "number"
     },
     "index_date": {
      "type": "string",
      "format": "date"
     },
     "spread_bps": {
      "type": "object",
      "properties": {
       "lo": {
        "type": "number"
       },
       "hi": {
        "type": "number"
       }
      }
     }
    }
   },
   "Program": {
    "type": "object",
    "properties": {
     "slug": {
      "type": "string",
      "enum": [
       "agency-supplemental-loans",
       "bank-commercial-mortgage",
       "bridge-loans",
       "c-pace-financing",
       "cmbs-conduit-loans",
       "construction-loans",
       "credit-tenant-lease-financing",
       "credit-union-commercial-loans",
       "debt-fund-loans",
       "dscr-commercial-loans",
       "fannie-mae-multifamily-loans",
       "fannie-mae-small-loans",
       "fha-221d4-loans",
       "fha-223a7-loans",
       "fha-223f-loans",
       "freddie-mac-optigo-loans",
       "freddie-mac-small-balance-loans",
       "hard-money-commercial-loans",
       "hud-232-loans",
       "land-loans",
       "leasehold-financing",
       "life-company-loans",
       "mezzanine-loans",
       "owner-occupied-commercial-mortgage",
       "portfolio-and-blanket-loans",
       "preferred-equity",
       "sasb-loans"
      ]
     },
     "name": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "family": {
      "type": "string",
      "enum": [
       "bank",
       "agency",
       "fha",
       "life-company",
       "cmbs",
       "bridge",
       "construction",
       "non-bank",
       "subordinate",
       "sba",
       "specialty"
      ]
     },
     "lender_type": {
      "type": "string"
     },
     "eligible_property": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "purposes": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "rate_type": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "index_series": {
      "type": "string",
      "enum": [
       "UST5",
       "UST7",
       "UST10",
       "SOFR",
       "SOFR30",
       "PRIME"
      ]
     },
     "spread_bps": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "lo": {
        "type": "number"
       },
       "hi": {
        "type": "number"
       }
      }
     },
     "indicative_rate": {
      "$ref": "#/components/schemas/Rate"
     },
     "build_time_rate": {
      "type": [
       "object",
       "null"
      ]
     },
     "limits": {
      "type": "object",
      "description": "Numbers, or null when no verified source publishes the limit.",
      "properties": {
       "size_min": {
        "type": [
         "number",
         "null"
        ]
       },
       "size_max": {
        "type": [
         "number",
         "null"
        ]
       },
       "max_ltv": {
        "type": [
         "number",
         "null"
        ]
       },
       "max_ltc": {
        "type": [
         "number",
         "null"
        ]
       },
       "min_dscr": {
        "type": [
         "number",
         "null"
        ]
       },
       "min_debt_yield": {
        "type": [
         "number",
         "null"
        ]
       },
       "term_years": {
        "type": "object"
       },
       "amortization_years_max": {
        "type": [
         "number",
         "null"
        ]
       },
       "timeline_days": {
        "type": "object"
       }
      }
     },
     "recourse": {
      "type": [
       "string",
       "null"
      ]
     },
     "prepayment": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "summary": {
      "type": [
       "string",
       "null"
      ]
     },
     "best_for": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "avoid_if": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "compare_with": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "facts": {
      "type": "object",
      "additionalProperties": {
       "$ref": "#/components/schemas/Fact"
      }
     }
    }
   },
   "ProgramList": {
    "type": "object",
    "properties": {
     "ok": {
      "type": "boolean"
     },
     "rules_built_at": {
      "type": "string"
     },
     "priced_at": {
      "type": "string"
     },
     "formula": {
      "type": "string"
     },
     "index": {
      "type": "object"
     },
     "count": {
      "type": "integer"
     },
     "programs": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Program"
      }
     }
    }
   },
   "MatchRow": {
    "type": "object",
    "properties": {
     "rank": {
      "type": "integer"
     },
     "slug": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "url": {
      "type": "string"
     },
     "fit": {
      "type": "string",
      "enum": [
       "strong",
       "possible",
       "stretch"
      ]
     },
     "score": {
      "type": "number"
     },
     "reasons": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "cautions": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "indicative_rate": {
      "$ref": "#/components/schemas/Rate"
     },
     "max_loan": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "amount": {
        "type": "number"
       },
       "binding": {
        "type": "string"
       },
       "binding_label": {
        "type": "string"
       },
       "tests": {
        "type": "object"
       }
      }
     },
     "facts": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Fact"
      }
     }
    }
   },
   "MatchResult": {
    "type": "object",
    "properties": {
     "ok": {
      "type": "boolean"
     },
     "input": {
      "type": "object"
     },
     "results": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/MatchRow"
      }
     },
     "layers": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/MatchRow"
      }
     },
     "excluded": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "slug": {
         "type": "string"
        },
        "name": {
         "type": "string"
        },
        "why": {
         "type": "string"
        }
       }
      }
     },
     "notes": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "rules": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "text": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}