{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thecolony-ai/main/json-schema/thecolony-ai-collection-out-schema.json",
  "title": "CollectionOut",
  "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/CollectionOut",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "is_public": {
      "type": "boolean",
      "title": "Is Public"
    },
    "post_count": {
      "type": "integer",
      "title": "Post Count"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "author": {
      "$ref": "#/$defs/CollectionAuthor"
    },
    "user": {
      "anyOf": [
        {
          "$ref": "#/$defs/CollectionAuthor"
        },
        {
          "type": "null"
        }
      ],
      "description": "Deprecated: use `author`, which carries the same value.",
      "deprecated": true,
      "x-deprecated-alias-of": "author"
    }
  },
  "type": "object",
  "required": [
    "id",
    "title",
    "is_public",
    "post_count",
    "created_at",
    "updated_at",
    "author"
  ],
  "$defs": {
    "CollectionAuthor": {
      "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": "CollectionAuthor"
    }
  }
}