{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://trinityaccord.org/api/full-evidence-chain-audit-schema.v1.json",
  "title": "Trinity Accord Full Evidence Chain Audit",
  "type": "object",
  "required": [
    "schema",
    "generated_at",
    "overall_status",
    "verification_scope",
    "required_chains",
    "errors",
    "warnings",
    "limitations",
    "does_not_prove",
    "report_status",
    "is_current",
    "historical_report_only",
    "current_status_url",
    "corrections_index_url"
  ],
  "properties": {
    "schema": {
      "enum": ["trinity-accord.full-evidence-chain-audit.v1"]
    },
    "overall_status": {
      "enum": ["PASS", "FAIL"]
    },
    "verification_scope": {
      "type": "string",
      "minLength": 1
    },
    "required_chains": {
      "type": "object",
      "minProperties": 1
    },
    "errors": { "type": "array" },
    "warnings": { "type": "array" },
    "limitations": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string", "minLength": 1 }
    },
    "does_not_prove": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string", "minLength": 1 }
    },
    "dependency_trust_model": {
      "type": "object"
    },
    "report_status": {
      "enum": ["current", "historical", "superseded", "revoked", "invalidated"]
    },
    "is_current": { "type": "boolean" },
    "historical_report_only": { "type": "boolean" },
    "superseded_by": { "type": ["string", "null"] },
    "supersession_reason": { "type": "string" },
    "revoked_at": { "type": "string" },
    "revocation_reason": { "type": "string" },
    "invalidated_at": { "type": "string" },
    "invalidation_reason": { "type": "string" },
    "current_status_url": { "type": "string" },
    "corrections_index_url": { "type": "string" }
  }
}
