{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://data.publicinformation.ie/schemas/foi-disclosures.schema.json",
  "title": "FOI Disclosure",
  "description": "A single row extracted from a public body's FOI disclosure log file, linked to exactly one public body",
  "type": "object",
  "properties": {
    "@id": {"type": "string", "format": "uri", "description": "Persistent URI for the disclosure record, derived from a hash of the source file_url and the record's position within that file"},
    "@type": {"type": "string", "const": "foi:FoiDisclosure"},
    "@context": {"type": "object"},
    "public_body": {"type": "string", "format": "uri", "description": "URI of the public body this disclosure belongs to (the same @id published in the public-bodies dataset)"},
    "name": {"type": "string", "description": "Public body name as it appears in the source disclosure log"},
    "file_url": {"type": "string", "format": "uri", "description": "URL of the source disclosure log file this row was extracted from"},
    "file_type": {"type": "string", "description": "File format of the source document (pdf, xlsx, xls)"},
    "foi_reference_id": {"type": "string", "description": "The public body's own reference number for this request, if published"},
    "decision_date": {"type": "string", "format": "date", "description": "Date the FOI decision was made"},
    "date_received": {"type": "string", "format": "date", "description": "Date the FOI request was received"},
    "requester_type": {"type": "string", "description": "Category of requester (e.g. Journalist, Member of the Public), as published by the body"},
    "decision_status": {"type": "string", "description": "Outcome of the request (e.g. Granted, Part Granted, Refused), as published by the body"},
    "review_status": {"type": "string", "description": "Internal or Information Commissioner review outcome, if any"},
    "related_request": {"type": "string", "description": "Reference to a related FOI request, if published"},
    "request_description": {"type": "string", "description": "Free-text description of what was requested"},
    "known_issues": {
      "type": "array",
      "items": {"type": "string"},
      "description": "Per-record extraction confidence signals (e.g. OCR issues, misaligned rows) — an empty array means none were flagged, not that the record is verified clean"
    },
    "missing_columns": {
      "type": "array",
      "items": {"type": "string"},
      "description": "Names of fields the source file did not provide a value for at all (distinct from a field being genuinely null)"
    }
  },
  "required": ["@id", "@type", "public_body", "name", "file_url", "file_type", "known_issues", "missing_columns"]
}
