{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mantic/json-schema/mantic-question-set-schema.json",
  "title": "QuestionSet",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mantic-question-sets-api-openapi.yml#/components/schemas/QuestionSet",
  "properties": {
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Title"
    },
    "mode": {
      "$ref": "#/$defs/QuestionGroupMode",
      "default": "standard"
    },
    "template": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Template",
      "description": "Title template with `{name}` placeholders."
    },
    "variables": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/QuestionGroupVariable"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Variables"
    },
    "runs_per_question": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Runs Per Question",
      "description": "Scout forecasts per question, the first included."
    },
    "window_end": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Window End",
      "description": "When a scout set's last committed run is due."
    },
    "id": {
      "type": "integer",
      "title": "Id",
      "description": "Unique identifier for the question set."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "When the set was created."
    }
  },
  "type": "object",
  "required": [
    "id",
    "created_at"
  ],
  "$defs": {
    "QuestionGroupMode": {
      "type": "string",
      "enum": [
        "standard",
        "scout"
      ],
      "title": "QuestionGroupMode",
      "description": "How a `QuestionGroup`'s questions are forecast.\n\n- ``STANDARD``: normal schedules, no minimum size.\n- ``SCOUT``: a committed number of runs per question spread up to ``window_end``."
    },
    "QuestionGroupVariable": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "options": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Options"
        }
      },
      "type": "object",
      "required": [
        "name",
        "options"
      ],
      "title": "QuestionGroupVariable",
      "description": "One variable extracted from the query, with the values it ranges over."
    }
  }
}