{
  "$ref": "#/definitions/HistoricalResult",
  "definitions": {
    "HistoricalResult": {
      "type": "object",
      "properties": {
        "election_id": {
          "type": "string",
          "minLength": 1,
          "description": "Identifier for the election, e.g. \"cz-parliament-2021\"."
        },
        "choice_id": {
          "type": "string",
          "minLength": 1,
          "description": "The choice_id as it appeared in that election. Omit when identical to the current Choice.id. Use when the party ran under a different name/coalition (e.g. storing ODS's 2021 result on the SPOLU coalition choice)."
        },
        "values": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "description": "Flexible numeric or string values for this election result. Recommended keys: \"percent\", \"seats\", \"rank\", \"votes\". Example: { \"percent\": 27.7, \"seats\": 71 }"
        }
      },
      "required": [
        "election_id",
        "values"
      ],
      "additionalProperties": false,
      "description": "One previous-election result stored on a Choice.\n\nLayer: reference data (embedded in Choice)\n\nUsed to track what a party, coalition, or candidate achieved in past elections, even if the choice ran under a different ID at the time."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}