{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://cover-desk.pages.dev/open-cover/schemas/incident-report.json",
  "title": "Open Cover 0.1: incident-report",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "incident_date",
    "incident_time",
    "area",
    "description",
    "vehicles_involved",
    "injuries",
    "police_reference_obtained",
    "drivable",
    "fault_view"
  ],
  "properties": {
    "incident_date": {
      "type": "string",
      "format": "date",
      "description": "The date of the accident, YYYY-MM-DD."
    },
    "incident_time": {
      "type": "string",
      "minLength": 5,
      "maxLength": 5,
      "description": "The time of the accident, 24-hour HH:MM."
    },
    "area": {
      "type": "string",
      "enum": [
        "old_town",
        "harbourside",
        "hillcrest",
        "saltmarsh",
        "elsewhere"
      ],
      "description": "Where it happened, roughly."
    },
    "description": {
      "type": "string",
      "minLength": 10,
      "maxLength": 500,
      "description": "What happened, in a few sentences. No names, plates, phone numbers or policy numbers."
    },
    "vehicles_involved": {
      "type": "integer",
      "minimum": 1,
      "maximum": 6,
      "description": "How many vehicles were involved, including the visitor's."
    },
    "injuries": {
      "type": "boolean",
      "description": "Whether anyone was hurt."
    },
    "police_reference_obtained": {
      "type": "boolean",
      "description": "Whether the police gave a case reference. The number itself is typed in the insurer's window."
    },
    "drivable": {
      "type": "boolean",
      "description": "Whether the visitor's car can still be driven safely."
    },
    "fault_view": {
      "type": "string",
      "enum": [
        "other_driver",
        "me",
        "shared",
        "unsure"
      ],
      "description": "Who the visitor thinks caused it."
    }
  }
}
