{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/passage-data-com/json-schema/passage-data-com-archive-audit-schema.json",
  "title": "ArchiveAudit",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/passage-data-com-openapi.json#/components/schemas/ArchiveAudit",
  "type": "object",
  "properties": {
    "archive": {
      "type": "object",
      "description": "source (gbif, url, upload), dataset (GBIF's registry entry), url, bytes, sha256, core, extensions, read"
    },
    "scope": {
      "type": "object",
      "description": "rows_read, rows_in_file, complete, columns_read, columns_unmapped, reads"
    },
    "summary": {
      "type": "object",
      "properties": {
        "checks": {
          "type": "integer"
        },
        "checks_fired": {
          "type": "integer"
        },
        "defects": {
          "type": "integer"
        },
        "defects_shown": {
          "type": "integer"
        },
        "cells": {
          "type": "integer"
        },
        "bdq_ran": {
          "type": "integer"
        },
        "bdq_not_compliant": {
          "type": "integer"
        },
        "bdq_not_run": {
          "type": "integer"
        }
      }
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "proposes_a_fix": {
            "type": "boolean"
          },
          "findings": {
            "type": "integer"
          },
          "what": {
            "type": "string"
          },
          "do": {
            "type": "string"
          }
        }
      }
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "check": {
            "type": "integer",
            "description": "index into checks"
          },
          "code": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "of_rows": {
            "type": "integer"
          },
          "file": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "lines_matched": {
            "type": [
              "integer",
              "null"
            ]
          },
          "by": {
            "type": "string",
            "enum": [
              "value",
              "row_position",
              "blank_cell",
              "bdq_test",
              "declaration"
            ]
          },
          "not_located": {
            "type": "string"
          },
          "proposal": {
            "type": "object"
          },
          "asks": {
            "type": "string"
          }
        }
      }
    },
    "bdq": {
      "type": "object",
      "description": "standard, unit, file, records, summary, ran (test, terms, compliant, not_compliant, prerequisites_not_met, file, lines, values), not_run by code"
    },
    "kept": {
      "type": "object"
    },
    "annex": {
      "type": "object",
      "properties": {
        "format": {
          "type": "string"
        },
        "chars": {
          "type": "integer"
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "says": {
      "type": "string"
    }
  }
}