{
  "$id": "spec-kitty-events/content_hash_ref",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Content fingerprint with optional size and encoding metadata.",
  "properties": {
    "algorithm": {
      "enum": [
        "sha256",
        "sha512",
        "md5"
      ],
      "title": "Algorithm",
      "type": "string"
    },
    "encoding": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Encoding"
    },
    "hash": {
      "description": "Hex-encoded content hash",
      "minLength": 1,
      "title": "Hash",
      "type": "string"
    },
    "size_bytes": {
      "anyOf": [
        {
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Size Bytes"
    }
  },
  "required": [
    "hash",
    "algorithm"
  ],
  "title": "ContentHashRef",
  "type": "object"
}
