{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craaft-io/json-schema/craaft-io-card-schema.json",
  "title": "Card",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craaft-io-openapi.yml#/components/schemas/Card",
  "type": "object",
  "required": [
    "id",
    "projectId",
    "column",
    "title",
    "position",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "projectId": {
      "type": "string",
      "format": "uuid"
    },
    "column": {
      "type": "string"
    },
    "title": {
      "type": "string",
      "maxLength": 500
    },
    "description": {
      "type": "string",
      "description": "Full body on GET /cards/{id}, PATCH, create, and /detail.\nOmitted from GET /projects/{id}/cards and lean SSE card.updated\nevents (position-only moves).\n"
    },
    "position": {
      "type": "number"
    },
    "dueDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "assignedUserId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "assignedUserName": {
      "type": [
        "string",
        "null"
      ]
    },
    "size": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Optional integer size estimate; null when unset"
    },
    "priority": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "low",
        "medium",
        "high",
        "urgent",
        null
      ]
    },
    "createdBy": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "createdByName": {
      "type": [
        "string",
        "null"
      ]
    },
    "updatedBy": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "updatedByName": {
      "type": [
        "string",
        "null"
      ]
    },
    "attachmentCount": {
      "type": "integer"
    },
    "checklistDone": {
      "type": "integer",
      "description": "Completed checklist items (denormalized count)"
    },
    "checklistTotal": {
      "type": "integer",
      "description": "Total checklist items (denormalized count)"
    },
    "tags": {
      "type": "array",
      "maxItems": 12,
      "items": {
        "type": "string",
        "maxLength": 32
      }
    },
    "following": {
      "type": "boolean",
      "description": "Whether the authenticated caller follows this card"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}