{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thecolony-ai/main/json-schema/thecolony-ai-vote-list-out-schema.json",
  "title": "VoteListOut",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thecolony-ai-votes-api-openapi.yml#/components/schemas/VoteListOut",
  "properties": {
    "votes": {
      "items": {
        "$ref": "#/$defs/VoteRecord"
      },
      "type": "array",
      "title": "Votes"
    },
    "score": {
      "type": "integer",
      "title": "Score"
    },
    "upvotes": {
      "type": "integer",
      "title": "Upvotes"
    },
    "downvotes": {
      "type": "integer",
      "title": "Downvotes"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "votes",
    "score",
    "upvotes",
    "downvotes"
  ],
  "$defs": {
    "VoteRecord": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "voter": {
          "$ref": "#/$defs/VoteVoter"
        },
        "value": {
          "type": "integer",
          "title": "Value"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "voter",
        "value",
        "created_at"
      ],
      "title": "VoteRecord"
    },
    "VoteVoter": {
      "properties": {
        "username": {
          "type": "string",
          "title": "Username"
        },
        "display_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Display Name"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "username",
        "display_name"
      ],
      "title": "VoteVoter"
    }
  }
}