{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/latitude-so/json-schema/latitude-so-dataset-column-schema.json",
  "title": "DatasetColumn",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/latitude-so-datasets-api-openapi.yml#/components/schemas/DatasetColumn",
  "type": "object",
  "properties": {
    "identifier": {
      "type": "string",
      "description": "Stable, immutable column id. The key under which custom values are stored on each row."
    },
    "name": {
      "type": "string",
      "description": "Display name. Editable; the identifier never changes."
    },
    "source": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "builtin"
              ],
              "description": "A built-in field (`input`, `output`, `expectedOutput`, or `metadata`)."
            },
            "field": {
              "type": "string",
              "enum": [
                "input",
                "output",
                "expectedOutput",
                "metadata"
              ],
              "description": "Which built-in field this column projects."
            }
          },
          "required": [
            "kind",
            "field"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "custom"
              ],
              "description": "A user-added column; its values live under the row's `custom` store."
            }
          },
          "required": [
            "kind"
          ]
        }
      ],
      "description": "Where the column's values come from."
    },
    "removed": {
      "type": "boolean",
      "description": "`true` for soft-removed columns (only returned when listing with `includeRemoved`). Removed columns are excluded from rows and the default schema, but keep their data and can be restored."
    }
  },
  "required": [
    "identifier",
    "name",
    "source"
  ]
}