{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/test_exceptions.schema.json",
  "title": "tables/test_exceptions.json",
  "description": "The rows of the table test_exceptions that belong to the workspace, one object per row, keyed by the database's column names.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "organization_id": {
        "type": "string",
        "format": "uuid"
      },
      "test_key": {
        "type": "string"
      },
      "source_key": {
        "type": "string"
      },
      "resource_kind": {
        "type": "string",
        "enum": [
          "account",
          "device",
          "vulnerability",
          "person",
          "access_system",
          "evidence",
          "incident",
          "ai_system",
          "connector",
          "pentest_engagement"
        ]
      },
      "resource_id": {
        "type": "string",
        "format": "uuid"
      },
      "resource_label": {
        "type": "string"
      },
      "reason_code": {
        "type": "string",
        "enum": [
          "test_or_demo_account",
          "not_company_device",
          "covered_by_other_control",
          "other"
        ]
      },
      "reason_text": {
        "type": "string"
      },
      "compensating_measure": {
        "type": [
          "string",
          "null"
        ]
      },
      "expires_on": {
        "type": "string",
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "created_by": {
        "type": "string",
        "format": "uuid"
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "revoked_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "revoked_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      }
    },
    "required": [
      "id",
      "organization_id",
      "test_key",
      "source_key",
      "resource_kind",
      "resource_id",
      "resource_label",
      "reason_code",
      "reason_text",
      "compensating_measure",
      "expires_on",
      "created_by",
      "created_at",
      "revoked_by",
      "revoked_at"
    ],
    "additionalProperties": false
  }
}
