{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/BreakdownSimulationResult",
  "title": "BreakdownSimulationResult",
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "description": "Breakdown value label."
    },
    "data": {
      "type": "array",
      "items": {
        "type": "number",
        "format": "double"
      },
      "description": "Data values for each point."
    },
    "dates": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Date labels for each point."
    },
    "scores": {
      "type": "array",
      "items": {
        "type": "number",
        "format": "double",
        "nullable": true
      },
      "description": "Anomaly score for each point."
    },
    "triggered_indices": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Indices of points flagged as anomalies."
    },
    "triggered_dates": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dates of points flagged as anomalies."
    },
    "total_points": {
      "type": "integer",
      "description": "Total number of data points analyzed."
    },
    "anomaly_count": {
      "type": "integer",
      "description": "Number of anomalies detected."
    },
    "sub_detector_scores": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Per-sub-detector scores for ensemble detectors."
    }
  },
  "required": [
    "anomaly_count",
    "data",
    "dates",
    "label",
    "scores",
    "total_points",
    "triggered_dates",
    "triggered_indices"
  ]
}