{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hunchsheet-app/json-schema/hunchsheet-app-ask-request-schema.json",
  "title": "AskRequest",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hunchsheet-app-openapi.json#/components/schemas/AskRequest",
  "type": "object",
  "required": [
    "kind",
    "rows"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "noul",
        "choice",
        "score",
        "multi"
      ],
      "description": "noul = yes/no question. choice = pick one option. score = position on a scale. multi = several yes/no questions at once."
    },
    "question": {
      "type": "string",
      "description": "Required for noul and score: the question, with the full definition of yes (or what the scale measures) inside it. Optional for choice. Ignored for multi."
    },
    "options": {
      "description": "Required for choice (2-255 entries) and score (2-10, low to high). Each entry is \"label\" or \"label: description\". Also accepts one |-joined string.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "maxItems": 255
        },
        {
          "type": "string"
        }
      ]
    },
    "questions": {
      "description": "Required for multi: 1 to 10 yes/no questions, each answered once per row. Also accepts one |-joined string.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "maxItems": 10
        },
        {
          "type": "string"
        }
      ]
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 40,
      "description": "Texts to judge, up to 40 per call. Blank entries and entries repeated in the same call cost nothing."
    }
  }
}