{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mantic/json-schema/mantic-draft-patch-schema.json",
  "title": "DraftPatch",
  "description": "A partial update to a question draft. Unset fields are left untouched.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mantic-question-drafts-api-openapi.yml#/components/schemas/DraftPatch",
  "properties": {
    "title": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 512
        },
        {
          "type": "null"
        }
      ],
      "title": "Title"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 8000
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "resolution_criteria": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 8000
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolution Criteria"
    },
    "question_type": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "binary",
            "numerical",
            "date",
            "multiple_choice"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Question Type"
    },
    "range_min": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Range Min"
    },
    "range_max": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Range Max"
    },
    "open_lower_bound": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Open Lower Bound"
    },
    "open_upper_bound": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Open Upper Bound"
    },
    "kind": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "continuous",
            "discrete"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Kind",
      "description": "Numerical only. discrete where only certain values can occur, as for a count or a policy rate set in quarter points; continuous for a measurement, even one published rounded."
    },
    "reporting_quantum": {
      "anyOf": [
        {
          "type": "number",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reporting Quantum",
      "description": "Numerical only. The step the answer is published in: 1 for a count, 0.25 for a policy rate, 0.01 for earnings per share. Leave it out for an average or anything worked out."
    },
    "multiple_choice_answers": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Multiple Choice Answers"
    },
    "resolution_time": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Timezone-aware timestamp; any offset is accepted and normalized to UTC"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolution Time"
    },
    "motivation": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000
        },
        {
          "type": "null"
        }
      ],
      "title": "Motivation"
    }
  },
  "additionalProperties": false,
  "type": "object"
}