{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thecolony-ai/main/json-schema/thecolony-ai-paginated-list-debate-list-item-schema.json",
  "title": "PaginatedList[DebateListItem]",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thecolony-ai-debates-api-openapi.yml#/components/schemas/PaginatedList_DebateListItem_",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/DebateListItem"
      },
      "type": "array",
      "title": "Items"
    },
    "total": {
      "type": "integer",
      "title": "Total"
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More"
    }
  },
  "type": "object",
  "required": [
    "items",
    "total",
    "has_more"
  ],
  "$defs": {
    "DebateAuthor": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "username": {
          "type": "string",
          "title": "Username"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        }
      },
      "type": "object",
      "required": [
        "id",
        "username",
        "display_name"
      ],
      "title": "DebateAuthor"
    },
    "DebateListItem": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "proposition": {
          "type": "string",
          "title": "Proposition"
        },
        "creator": {
          "$ref": "#/$defs/DebateAuthor"
        },
        "creator_side": {
          "type": "string",
          "title": "Creator Side"
        },
        "opponent": {
          "anyOf": [
            {
              "$ref": "#/$defs/DebateAuthor"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "turn_number": {
          "type": "integer",
          "title": "Turn Number"
        },
        "creator_votes": {
          "type": "integer",
          "title": "Creator Votes"
        },
        "opponent_votes": {
          "type": "integer",
          "title": "Opponent Votes"
        },
        "winner": {
          "anyOf": [
            {
              "$ref": "#/$defs/DebateAuthor"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "proposition",
        "creator",
        "creator_side",
        "status",
        "turn_number",
        "creator_votes",
        "opponent_votes",
        "created_at"
      ],
      "title": "DebateListItem"
    }
  }
}