{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/livetennisapi-com/json-schema/livetennisapi-com-rally-match-schema.json",
  "title": "RallyMatch",
  "description": "One charted match of the rally-construction corpus — its own id space, keyed on `rally_match_id`.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/livetennisapi-com-rally-api-openapi.yml#/components/schemas/RallyMatch",
  "type": "object",
  "properties": {
    "rally_match_id": {
      "type": "integer",
      "description": "The id this product is keyed on."
    },
    "source_id": {
      "type": "string"
    },
    "match_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "OUR match id, when the charted match is also one we hold. Null otherwise — most charted matches are older than our match table."
    },
    "date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "tournament": {
      "type": [
        "string",
        "null"
      ]
    },
    "round": {
      "type": [
        "string",
        "null"
      ]
    },
    "surface": {
      "type": [
        "string",
        "null"
      ]
    },
    "gender": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "M",
        "W",
        null
      ]
    },
    "best_of": {
      "type": [
        "integer",
        "null"
      ]
    },
    "players": {
      "type": "array",
      "maxItems": 2,
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "hand": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "R",
              "L",
              "U",
              "A",
              null
            ]
          }
        }
      }
    },
    "points": {
      "type": "integer",
      "description": "Charted points in this match."
    },
    "points_parsed": {
      "type": "integer",
      "description": "How many of them our parser read cleanly — the per-match quality number."
    }
  }
}