{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nopaque-co-uk/json-schema/nopaque-co-uk-update-survey-test-config-request-schema.json",
  "title": "UpdateSurveyTestConfigRequest",
  "description": "Body for `PATCH /testing/survey-test-configs/{id}`. Partial update — at\nleast one property is required, and an empty body is rejected.\n\n`null` clears an optional attribute (`description`, `tags`, `voiceId`).\n`scenario` accepts no null: every config has one, and there would be\nnothing to fall back to.\n",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nopaque-co-uk-survey-tests-api-openapi.yml#/components/schemas/UpdateSurveyTestConfigRequest",
  "type": "object",
  "minProperties": 1,
  "additionalProperties": false,
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 500
    },
    "sector": {
      "type": "string",
      "minLength": 1
    },
    "mission": {
      "type": "string",
      "minLength": 1
    },
    "acceptance": {
      "type": "string",
      "minLength": 1
    },
    "profileId": {
      "type": "string",
      "minLength": 1
    },
    "expectedTurns": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "description": "How many questions this survey asks.\n\n**The only limit that is actually enforced.** After this many\nanswers the conversation is disabled at the carrier, so the\n\"thanks for your feedback\" that ends most surveys reaches a\nrespondent that cannot reply.\n\nSet it here rather than per test — a survey asks the same number\nof questions every time. A single run may override it.\n\nOptional. Without it nothing is enforced, because guessing would\ncut a survey short.\n"
    },
    "scenario": {
      "$ref": "#/$defs/SurveyScenario"
    },
    "tags": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "maxItems": 10
    },
    "voiceId": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 200
    }
  },
  "$defs": {
    "SurveyScenario": {
      "type": "string",
      "description": "How the respondent behaves once the survey is under way.\n\nA closed set, deliberately. Each value maps to wording nopaque\nmaintains, so the behaviour can be improved without you rewriting saved\nconfigs, and a scenario cannot be saved that has no behaviour behind\nit. Clients design for the happy path; the other four are where survey\ntesting earns its keep.\n\nAnswers are never scripted. A survey explains its own scale as it goes\n(\"press 1 to 5, where 1 is least happy\") and a real respondent does not\nknow that until they are contacted — so the config says who the person\nis, and the respondent maps that onto whatever the survey presents.\n",
      "enum": [
        "happy-path",
        "out-of-range",
        "changes-mind",
        "abandons",
        "asks-question-back"
      ]
    }
  }
}