{
  "$ref": "#/definitions/DtVoteEventObjection",
  "definitions": {
    "DtVoteEventObjection": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique ID of this objection/correction record."
        },
        "vote_event_id": {
          "type": "string",
          "description": "ID of the vote event this objection refers to."
        },
        "type": {
          "type": "string",
          "enum": [
            "event_objection",
            "vote_correction"
          ],
          "description": "Type of objection. 'event_objection': challenge to the entire vote event on procedural or technical grounds (not tied to a specific MP's stated voting intent). 'vote_correction': an individual MP states they intended to vote differently; may remain a stenographic note (outcome=announced) or escalate to invalidation and a repeat vote (outcome=invalidated)."
        },
        "raised_by_id": {
          "type": "string",
          "description": "ID of the person or organization raising this objection/correction."
        },
        "raised_by_type": {
          "type": "string",
          "enum": [
            "person",
            "organization"
          ],
          "description": "Disambiguates whether raised_by_id refers to a person or an organization."
        },
        "outcome": {
          "type": "string",
          "enum": [
            "invalidated",
            "announced",
            "rejected"
          ],
          "description": "Result of the objection. 'invalidated': the vote event was declared invalid (and may be repeated; set status='invalid' on the vote-event). 'announced': objection/correction recorded for the minutes but the vote event result stands. 'rejected': the objection was formally considered and rejected."
        },
        "decision_vote_event_id": {
          "type": "string",
          "description": "ID of the vote event that decided the outcome of this objection (i.e. the procedural vote on whether to repeat the original vote). Applicable when outcome is 'invalidated' or 'rejected' and a separate procedural vote was held."
        },
        "repeated_vote_event_id": {
          "type": "string",
          "description": "ID of the new vote event that replaced the invalidated one. Only set when outcome is 'invalidated' and the vote was actually repeated."
        },
        "intended_option": {
          "type": "string",
          "description": "For vote_correction: the vote option the MP states they intended to cast (e.g. 'yes', 'no'). Uses the same option vocabulary as votes.option."
        },
        "date": {
          "type": "string",
          "description": "Date the objection was raised. YYYY-MM-DD or ISO datetime."
        },
        "note": {
          "type": "string",
          "description": "Free-text description, verbatim quote, or transcript reference for the objection."
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false
          },
          "description": "Source URLs (e.g. parliamentary minutes page)."
        },
        "extras": {
          "type": "object",
          "additionalProperties": {},
          "description": "Additional metadata fields not covered by the core schema."
        }
      },
      "required": [
        "id",
        "vote_event_id",
        "type"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}