{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/drivings-com/json-schema/drivings-com-study-options-schema.json",
  "title": "StudyOptions",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/drivings-com-openapi.json#/components/schemas/StudyOptions",
  "type": "object",
  "required": [
    "schemaVersion",
    "region",
    "options",
    "independenceNotice"
  ],
  "properties": {
    "schemaVersion": {
      "type": "string"
    },
    "region": {
      "$ref": "#/$defs/Region"
    },
    "regionName": {
      "type": "string"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "courseUrl",
          "onboardingHandoff"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/Course"
          },
          "name": {
            "type": "string"
          },
          "courseUrl": {
            "type": "string",
            "format": "uri"
          },
          "onboardingHandoff": {
            "$ref": "#/$defs/BrowserHandoff"
          }
        }
      }
    },
    "independenceNotice": {
      "type": "string"
    }
  },
  "$defs": {
    "BrowserHandoff": {
      "type": "object",
      "required": [
        "url",
        "kind",
        "requiresHumanConfirmation"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "kind": {
          "type": "string"
        },
        "requiresHumanConfirmation": {
          "const": true
        },
        "note": {
          "type": "string"
        },
        "warning": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "Course": {
      "type": "string",
      "enum": [
        "car",
        "motorcycle",
        "lgv",
        "pcv",
        "adi",
        "cdl"
      ]
    },
    "Region": {
      "type": "string",
      "enum": [
        "uk",
        "us"
      ]
    }
  }
}