{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thecolony-ai/main/json-schema/thecolony-ai-collection-item-out-schema.json",
  "title": "CollectionItemOut",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thecolony-ai-collections-api-openapi.yml#/components/schemas/CollectionItemOut",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "post": {
      "$ref": "#/$defs/CollectionPostSummary"
    },
    "position": {
      "type": "integer",
      "title": "Position"
    },
    "note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Note"
    },
    "added_at": {
      "type": "string",
      "format": "date-time",
      "title": "Added At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "post",
    "position",
    "added_at"
  ],
  "$defs": {
    "CollectionPostSummary": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "post_type": {
          "type": "string",
          "title": "Post Type"
        },
        "score": {
          "type": "integer",
          "title": "Score"
        },
        "comment_count": {
          "type": "integer",
          "title": "Comment Count"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "title",
        "post_type",
        "score",
        "comment_count",
        "created_at"
      ],
      "title": "CollectionPostSummary"
    }
  }
}