{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ufcalendar-com/json-schema/ufcalendar-com-fighter-discipline-response-schema.json",
  "title": "FighterDisciplineResponse",
  "description": "`data` is null (and `meta.note` says why) under 3 tracked bouts with no recorded foul.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ufcalendar-com-openapi.json#/components/schemas/FighterDisciplineResponse",
  "type": "object",
  "properties": {
    "data": {
      "oneOf": [
        {
          "$ref": "#/$defs/FighterDiscipline"
        },
        {
          "type": "null"
        }
      ]
    },
    "meta": {
      "type": "object",
      "properties": {
        "fighter_id": {
          "type": "integer"
        },
        "source": {
          "type": "string",
          "description": "Always `ufc-official`."
        },
        "coverage_since": {
          "type": "string",
          "format": "date",
          "description": "First card whose stoppages carry a reason (2018-12-08); earlier bouts are not counted."
        },
        "weight_class": {
          "type": [
            "string",
            "null"
          ],
          "description": "The weight class the tracked bouts were most often fought at."
        },
        "note": {
          "type": "string"
        },
        "ignored_params": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Present only when the request carried query parameters this endpoint does not take — they were ignored. Same list as the `X-UFCalendar-Ignored-Params` header. Sorted, unique."
        }
      },
      "required": [
        "fighter_id",
        "source",
        "coverage_since",
        "weight_class",
        "note"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "additionalProperties": false,
  "$defs": {
    "DisciplineEvent": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "title"
      ],
      "additionalProperties": false
    },
    "DisciplineIncident": {
      "type": "object",
      "properties": {
        "fight_id": {
          "type": "integer"
        },
        "date": {
          "type": "string",
          "format": "date",
          "description": "UTC day of the card's `starts_at`."
        },
        "event": {
          "$ref": "#/$defs/DisciplineEvent"
        },
        "opponent": {
          "$ref": "#/$defs/DisciplineOpponent"
        },
        "role": {
          "$ref": "#/$defs/DisciplineRole"
        },
        "reason": {
          "$ref": "#/$defs/FoulKind",
          "description": "What the foul was."
        },
        "basis": {
          "$ref": "#/$defs/FoulBasis"
        },
        "round": {
          "type": [
            "integer",
            "null"
          ]
        },
        "elapsed_sec": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Seconds elapsed in the round; null when no stoppage in the log is tied to the foul."
        },
        "stoppage_sec": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Real seconds the bout was stopped; null if it never resumed or was not timed."
        },
        "points_deducted": {
          "type": "integer",
          "description": "Points the commission deducted for it; 0 when none."
        },
        "ended_bout": {
          "type": "boolean",
          "description": "true when the bout ended on this foul."
        }
      },
      "required": [
        "fight_id",
        "date",
        "event",
        "opponent",
        "role",
        "reason",
        "basis",
        "round",
        "elapsed_sec",
        "stoppage_sec",
        "points_deducted",
        "ended_bout"
      ],
      "additionalProperties": false
    },
    "DisciplineOpponent": {
      "type": "object",
      "properties": {
        "slug": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "slug",
        "name"
      ],
      "additionalProperties": false
    },
    "DisciplineRole": {
      "type": "string",
      "enum": [
        "committed",
        "drawn"
      ],
      "description": "`committed` = by this fighter; `drawn` = by the opponent, against this fighter."
    },
    "FighterDiscipline": {
      "type": "object",
      "description": "Confirmed fouls in a fighter's UFC bouts: the log's eye pokes and low blows, plus any other foul a commission point deduction or the official result confirms. A recorded foul is not a ruling on intent.",
      "properties": {
        "tracked_fights": {
          "type": "integer",
          "description": "Settled UFC bouts since the coverage date that carry an in-fight log."
        },
        "cage_seconds": {
          "type": "integer",
          "description": "Seconds fought across those bouts."
        },
        "committed": {
          "$ref": "#/$defs/FoulCounts"
        },
        "drawn": {
          "$ref": "#/$defs/FoulCounts"
        },
        "points_deducted": {
          "type": "integer",
          "description": "Points the commission has taken from THIS fighter across those bouts."
        },
        "stoppage_sec": {
          "type": "integer",
          "description": "Real seconds bouts were stopped for THIS fighter's fouls."
        },
        "fouls_per_15": {
          "type": [
            "number",
            "null"
          ],
          "description": "Fouls committed per 15 minutes of cage time, to 3 places. Null under the sample floor (5 tracked bouts and 30 minutes)."
        },
        "incidents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DisciplineIncident"
          },
          "description": "Every confirmed foul this fighter committed or drew, most recent first."
        }
      },
      "required": [
        "tracked_fights",
        "cage_seconds",
        "committed",
        "drawn",
        "points_deducted",
        "stoppage_sec",
        "fouls_per_15",
        "incidents"
      ],
      "additionalProperties": false
    },
    "FoulBasis": {
      "type": "string",
      "enum": [
        "log",
        "deduction",
        "result"
      ],
      "description": "Which record confirms the foul: `log` = the in-fight log's own eye-poke / low-blow row; `deduction` = the athletic commission took a point for it; `result` = the bout ended on it (a disqualification, or a \"could not continue\" / no contest whose official detail describes a foul)."
    },
    "FoulCounts": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "`eye_pokes` + `low_blows` + `other`."
        },
        "eye_pokes": {
          "type": "integer"
        },
        "low_blows": {
          "type": "integer"
        },
        "other": {
          "type": "integer",
          "description": "Every other confirmed foul (see `FoulKind`)."
        }
      },
      "required": [
        "total",
        "eye_pokes",
        "low_blows",
        "other"
      ],
      "additionalProperties": false
    },
    "FoulKind": {
      "type": "string",
      "enum": [
        "eye_poke",
        "low_blow",
        "illegal_knee",
        "illegal_kick",
        "headbutt",
        "illegal_strike",
        "fence",
        "biting",
        "other"
      ],
      "description": "What the foul was. `eye_poke` and `low_blow` come labelled from the log; the rest are read from the commission's deduction reason or the official result detail: `illegal_knee` (a knee to a grounded opponent), `illegal_kick` (an upkick, a soccer kick or a stomp), `headbutt`, `illegal_strike` (back of the head, spine, 12-6 elbow), `fence` (grabbing the fence or cage), `biting`, and `other` when the record names no foul this vocabulary covers."
    }
  }
}