{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mantic/json-schema/mantic-question-draft-view-schema.json",
  "title": "QuestionDraftView",
  "description": "Full projection of a draft row for the client.",
  "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/QuestionDraftView",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "conversation_id": {
      "type": "integer",
      "title": "Conversation Id"
    },
    "draft_row_id": {
      "type": "string",
      "title": "Draft Row Id"
    },
    "user_id": {
      "type": "string",
      "title": "User Id"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "question_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Question Id"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "description": {
      "type": "string",
      "title": "Description"
    },
    "resolution_criteria": {
      "type": "string",
      "title": "Resolution Criteria"
    },
    "question_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Question Type"
    },
    "range_min": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Range Min"
    },
    "range_max": {
      "anyOf": [
        {
          "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"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kind"
    },
    "reporting_quantum": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reporting Quantum"
    },
    "multiple_choice_answers": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Multiple Choice Answers"
    },
    "resolution_time": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolution Time"
    },
    "motivation": {
      "type": "string",
      "title": "Motivation"
    },
    "locked_fields": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Locked Fields"
    },
    "schema_version": {
      "type": "integer",
      "title": "Schema Version"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "missing_required": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Missing Required",
      "description": "What submitting this draft would still be refused for.",
      "readOnly": true
    }
  },
  "type": "object",
  "required": [
    "id",
    "conversation_id",
    "draft_row_id",
    "user_id",
    "status",
    "question_id",
    "title",
    "description",
    "resolution_criteria",
    "question_type",
    "range_min",
    "range_max",
    "open_lower_bound",
    "open_upper_bound",
    "kind",
    "reporting_quantum",
    "multiple_choice_answers",
    "resolution_time",
    "motivation",
    "locked_fields",
    "schema_version",
    "created_at",
    "updated_at",
    "missing_required"
  ]
}