{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://cover-desk.pages.dev/open-cover/schemas/quote-request.json",
  "title": "Open Cover 0.1: quote-request",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "driver_age",
    "years_licensed",
    "area",
    "car_value",
    "parking",
    "km_per_month",
    "extra_drivers",
    "car_use"
  ],
  "properties": {
    "driver_age": {
      "type": "integer",
      "minimum": 17,
      "maximum": 90,
      "description": "The main driver's age in years."
    },
    "years_licensed": {
      "type": "integer",
      "minimum": 0,
      "maximum": 73,
      "description": "Full years the main driver has held a licence."
    },
    "area": {
      "type": "string",
      "enum": [
        "old_town",
        "harbourside",
        "hillcrest",
        "saltmarsh"
      ],
      "description": "Where the car is kept overnight in Kestrel Bay."
    },
    "car_value": {
      "type": "integer",
      "minimum": 2000,
      "maximum": 150000,
      "description": "The car's market value in dollars."
    },
    "parking": {
      "type": "string",
      "enum": [
        "garage",
        "driveway",
        "street"
      ],
      "description": "Where the car is parked overnight."
    },
    "km_per_month": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000,
      "description": "Kilometres driven in a typical month."
    },
    "extra_drivers": {
      "type": "string",
      "enum": [
        "none",
        "named",
        "unnamed_sometimes"
      ],
      "description": "Whether anyone else drives the car: nobody, drivers named on the policy, or occasionally someone not named."
    },
    "car_use": {
      "type": "string",
      "enum": [
        "private",
        "commuting",
        "business"
      ],
      "description": "Private use only, private use plus commuting, or business use such as deliveries or ride-hailing."
    }
  }
}
