{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://registry.farigate.com/schema/registry-index.schema.json",
  "title": "Farigate Registry Index",
  "type": "object",
  "required": ["schema_version", "generated_by", "release", "entries"],
  "additionalProperties": false,
  "properties": {
    "schema_version": { "const": 1 },
    "generated_by": { "const": "xtask registry-export" },
    "release": { "type": "string", "minLength": 1 },
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["path", "source", "sha256", "size"],
        "additionalProperties": false,
        "properties": {
          "path": { "type": "string", "minLength": 1 },
          "source": { "type": "string", "minLength": 1 },
          "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
          "size": { "type": "integer", "minimum": 0 }
        }
      }
    }
  }
}
