{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agilehero-io/json-schema/agilehero-io-card-update-schema.json",
  "title": "CardUpdate",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agilehero-io-openapi.yml#/components/schemas/CardUpdate",
  "type": "object",
  "minProperties": 1,
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "description_markdown": {
      "type": [
        "string",
        "null"
      ],
      "description": "Replaces the whole description; null or \"\" clears it."
    },
    "type": {
      "$ref": "#/$defs/CardType"
    },
    "epic_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "An epic of the project; null removes the card from its epic."
    },
    "due_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "estimation": {
      "$ref": "#/$defs/Estimation"
    },
    "label_ids": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "type": "string"
      },
      "description": "Replaces the card's labels."
    },
    "assignee_ids": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "type": "string"
      },
      "description": "Replaces the card's assignees."
    }
  },
  "$defs": {
    "CardType": {
      "type": "string",
      "enum": [
        "story",
        "bug",
        "chore",
        "research"
      ]
    },
    "Estimation": {
      "type": [
        "integer",
        "null"
      ],
      "enum": [
        0,
        1,
        2,
        3,
        5,
        8,
        13,
        null
      ],
      "description": "Complexity in story points (Fibonacci scale), not a time estimate."
    }
  }
}