{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaquill-ai/json-schema/vaquill-ai-matrix-column-patch-schema.json",
  "title": "MatrixColumnPatch",
  "description": "Change one column, including whether it is conditional on another.\n\n**Changing `question`, `columnType` or `options` BLANKS every cell in this\ncolumn.** `MatrixService.update_column` bulk-resets them to pending with a\nnull answer, no citations and no `answer_data`, which destroys a manually\nedited or approved answer and the verifier's verdict along with it. That is\ndefensible in a browser where a human just typed the new question and is\nlooking at the grid; it is not something a PATCH should do silently, which is\nwhy it is stated in each of those three field descriptions and not only\nhere. A generated client shows the field description.\n\n`label` and `instructions` do not reset anything: they change how the column\nreads and what guidance it carries, not what was asked.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaquill-ai-matrices-api-openapi.yml#/components/schemas/MatrixColumnPatch",
  "properties": {
    "label": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Label",
      "description": "New column heading. Resets nothing."
    },
    "question": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Question",
      "description": "New question for this column. WARNING: changing it clears every existing answer in this column, including answers a human wrote or approved and any verification verdict on them, and leaves the cells unanswered until the next run."
    },
    "columnType": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "free_text",
            "single_select",
            "date",
            "money",
            "yes_no",
            "party_name"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Columntype",
      "description": "New answer shape: `free_text`, `single_select`, `date`, `money`, `yes_no` or `party_name`. WARNING: changing it clears every existing answer in this column, as changing the question does."
    },
    "options": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Options",
      "description": "New allowed answers for a `single_select` column. WARNING: changing them clears every existing answer in this column, as changing the question does."
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000
        },
        {
          "type": "null"
        }
      ],
      "title": "Instructions",
      "description": "New extractor guidance scoped to this column. Resets nothing."
    },
    "dependsOnColumnId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Dependsoncolumnid",
      "description": "`col_` identifier of a column in this same matrix that this one becomes conditional on, or null to make it unconditional again. A cycle is refused."
    },
    "gateExpression": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500,
          "pattern": "^(any|not_empty|yes|no|yes_no:(?:yes|no)|equals:.+|in:.+)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Gateexpression",
      "description": "The condition on the upstream answer that has to hold for this column to run, or null to run whenever the dependency has answered. One of `any`, `not_empty`, `yes`, `no`, `yes_no:yes`, `yes_no:no`, `equals:VALUE` or `in:A|B|C`. Anything else is refused: an expression we cannot parse would mark every cell in the column as deliberately skipped with no error anywhere. `yes`, `no` and `equals:` match the WHOLE upstream answer, not part of it, so they belong on a `yes_no` or `single_select` upstream column; over a `free_text` one, use `not_empty`."
    },
    "injectUpstream": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Injectupstream",
      "description": "True prepends the upstream column's answer to this column's prompt, so the question can refer to it. False asks the question on its own."
    }
  },
  "additionalProperties": false,
  "type": "object"
}