{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://data.publicinformation.ie/schemas/foi-request-files.schema.json",
  "title": "FOI Request File",
  "description": "A source disclosure log file (PDF or spreadsheet) published by an Irish public body under FOI, linked to exactly one public body",
  "type": "object",
  "properties": {
    "@id": {"type": "string", "format": "uri", "description": "Persistent URI for the FOI request file"},
    "@type": {"type": "string", "const": "foi:FoiRequestFile"},
    "@context": {"type": "object"},
    "public_body": {"type": "string", "format": "uri", "description": "URI of the public body this file belongs to (the same @id published in the public-bodies dataset)"},
    "document_url": {"type": "string", "format": "uri", "description": "Direct URL to the source PDF/Excel file"},
    "source_page_url": {"type": "string", "format": "uri", "description": "URL of the page the file link was found on"},
    "file_type": {
      "type": "string",
      "enum": ["pdf", "xlsx", "xls"],
      "description": "File format of the source document"
    }
  },
  "required": ["@id", "@type", "public_body", "document_url", "source_page_url", "file_type"]
}
