{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CanonicalDocument",
  "type": "object",
  "required": ["document_id", "doc_id", "document_type", "category", "subcategory", "filename", "processed_at"],
  "properties": {
    "document_id": {"type": "string"},
    "doc_id": {"type": "string"},
    "applicant_id": {"type": "string"},
    "document_type": {"type": "string"},
    "category": {"type": "string"},
    "subcategory": {"type": "string"},
    "filename": {"type": "string"},
    "extension": {"type": "string"},
    "source_type": {"type": "string"},
    "source_file": {"type": "string"},
    "text_preview": {"type": "string"},
    "owner": {"type": "object"},
    "identifiers": {"type": "object"},
    "dates": {"type": "object"},
    "review_status": {"type": "string"},
    "relevance": {"type": "object"},
    "verified_evidence": {"type": "array", "items": {"type": "object"}},
    "inferred_suggestions": {"type": "array", "items": {"type": "object"}},
    "missing_evidence": {"type": "array", "items": {"type": "object"}},
    "processed_at": {"type": "string"}
  }
}
