{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whichli-com/json-schema/whichli-com-poll-results-schema.json",
  "title": "PollResults",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whichli-com-openapi.yml#/components/schemas/PollResults",
  "type": "object",
  "required": [
    "publicId",
    "title",
    "mode",
    "totalVoters",
    "voteUrl",
    "resultsUrl",
    "winner",
    "standings"
  ],
  "properties": {
    "publicId": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": [
        "duel",
        "swipe"
      ]
    },
    "totalVoters": {
      "type": "integer"
    },
    "voteUrl": {
      "type": "string",
      "format": "uri"
    },
    "resultsUrl": {
      "type": "string",
      "format": "uri"
    },
    "winner": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "caption": {
              "type": "string"
            },
            "imageUrl": {
              "type": "string",
              "format": "uri"
            },
            "votes": {
              "type": "integer"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "standings": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}