{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mantic/json-schema/mantic-service-api-routes-core-types-question-sets-create-question-set-request-schema.json",
  "title": "CreateQuestionSetRequest",
  "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/service__api__routes__core__types__question_sets__CreateQuestionSetRequest",
  "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."
    },
    "question_draft_ids": {
      "items": {
        "type": "integer"
      },
      "type": "array",
      "maxItems": 500,
      "minItems": 1,
      "title": "Question Draft Ids",
      "description": "Drafts the set's questions are created from, one question per draft."
    }
  },
  "type": "object",
  "required": [
    "question_draft_ids"
  ],
  "$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."
    }
  }
}