{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tesseralytics-dev/json-schema/tesseralytics-dev-dataset-doc-schema.json",
  "title": "DatasetDoc",
  "description": "One dataset's catalog entry + full data dictionary.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/tesseralytics-dev-openapi-openapi.json#/components/schemas/DatasetDoc",
  "type": "object",
  "required": [
    "name",
    "title",
    "category",
    "cadence",
    "summary",
    "description",
    "column_count",
    "column_groups"
  ],
  "properties": {
    "cadence": {
      "type": "string",
      "description": "How frequently the data is sampled, e.g. \"1-minute bars\"."
    },
    "category": {
      "type": "string",
      "description": "Presentation category, e.g. `raw-tiles` or `forecast-layer`."
    },
    "column_count": {
      "type": "integer",
      "description": "Number of documented columns.",
      "minimum": 0
    },
    "column_groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ColumnGroup"
      },
      "description": "Columns, grouped for presentation, in schema order."
    },
    "description": {
      "type": "string",
      "description": "Longer prose — the dictionary page header."
    },
    "direct_answer": {
      "type": "string",
      "description": "40-60 word keyword-first lead answer — the definitional \"what is this\"\nblurb, and the strongest AI-citation extraction target. Defaulted for\nforward/backward compatibility with snapshots predating the field."
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Per-dataset discovery keywords (schema.org keywords on the web)."
    },
    "name": {
      "type": "string",
      "description": "Dataset name, exactly as `list_datasets` reports it."
    },
    "note": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional \"how to use this\" callout."
    },
    "seo_title": {
      "type": "string",
      "description": "Keyword-first SEO title tag (web `<title>`). Defaulted so older snapshots\nwithout the field still deserialize."
    },
    "summary": {
      "type": "string",
      "description": "One-line intuitive summary — the catalog card."
    },
    "temporal": {
      "$ref": "#/$defs/Temporal",
      "description": "Machine-readable timestamp/interval contract: what the label marks and\nhow to join without leaking the future. Defaulted so snapshots predating\nthe field still deserialize."
    },
    "title": {
      "type": "string",
      "description": "Human-friendly title, e.g. \"Order-flow OHLCV (1-minute)\"."
    },
    "use_case": {
      "type": "string",
      "description": "One-line \"what you'd use it for\" (buyer-intent) copy."
    }
  },
  "$defs": {
    "ColumnDoc": {
      "type": "object",
      "description": "One column's dictionary entry: the engineering facts (type/nullability/how\nit's computed) plus the plain-English `meaning` (what it is and why you'd care).",
      "required": [
        "name",
        "type",
        "nullable",
        "meaning"
      ],
      "properties": {
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Technical description — *how* the column is computed. May be absent."
        },
        "meaning": {
          "type": "string",
          "description": "Plain-English meaning — *what* the column is and why it's useful."
        },
        "name": {
          "type": "string",
          "description": "Column name."
        },
        "nullable": {
          "type": "boolean",
          "description": "Whether the column may be null."
        },
        "type": {
          "type": "string",
          "description": "Arrow type string, e.g. `float64`, `timestamp[us]`."
        }
      }
    },
    "ColumnGroup": {
      "type": "object",
      "description": "A labelled section of columns within a dataset.",
      "required": [
        "columns"
      ],
      "properties": {
        "columns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ColumnDoc"
          }
        },
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "Section heading, or `null` for a single unlabelled group."
        },
        "meaning": {
          "type": [
            "string",
            "null"
          ],
          "description": "Group-level plain-English meaning, used for large column families (e.g.\nthe residualized factor backbone) where a per-column line adds no value."
        },
        "window": {
          "type": [
            "string",
            "null"
          ],
          "description": "Temporal window of this group's fields relative to the timestamp label:\none of `point_in_time`, `backward`, `forward`, `contemporaneous`,\n`static`. Null when the dataset-level `temporal.convention` covers them."
        }
      }
    },
    "Temporal": {
      "type": "object",
      "description": "The dataset's temporal contract — what the timestamp column marks and the\nlook-ahead-safety rules for joining. Mirror of the resolver's `temporal`\nblock (`semantic/__init__.py`).",
      "required": [
        "grain",
        "timestamp_field",
        "label",
        "convention"
      ],
      "properties": {
        "convention": {
          "type": "string",
          "description": "One-paragraph plain-English join / look-ahead contract."
        },
        "grain": {
          "type": "string",
          "description": "Observation width, e.g. `1m`, `1h`, `1d`, `1mo`."
        },
        "label": {
          "type": "string",
          "description": "What the label marks: one of `interval_start`, `interval_end`,\n`snapshot`, `forecast_target`."
        },
        "timestamp_field": {
          "type": "string",
          "description": "Which column carries the label, e.g. `time`, `day`, `month_start`."
        }
      }
    }
  }
}