{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetkeep-co-uk/json-schema/fleetkeep-co-uk-defect-event-schema.json",
  "title": "DefectEvent",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetkeep-co-uk-defects-api-openapi.yml#/components/schemas/DefectEvent",
  "type": "object",
  "required": [
    "id",
    "vehicleId",
    "registration",
    "vehicleLabel",
    "title",
    "notes",
    "priority",
    "reportedBy",
    "followUpAction",
    "status",
    "completedAt",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "vehicleId": {
      "type": "string",
      "format": "uuid"
    },
    "registration": {
      "type": "string"
    },
    "vehicleLabel": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": "string"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "priority": {
      "type": "string",
      "enum": [
        "low",
        "normal",
        "high",
        "safety_critical"
      ]
    },
    "reportedBy": {
      "type": [
        "string",
        "null"
      ]
    },
    "followUpAction": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "completed"
      ]
    },
    "completedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false
}