{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/decide-fyi/json-schema/decide-fyi-policy-bundle-registry-schema.json",
  "title": "PolicyBundleRegistry",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/decide-fyi-registries-api-openapi.yml#/components/schemas/PolicyBundleRegistry",
  "type": "object",
  "required": [
    "ok",
    "status",
    "bundles",
    "registry_hash"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "status": {
      "type": "string"
    },
    "current_policy_bundle_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "current": {
      "$ref": "#/$defs/PolicyBundle"
    },
    "bundles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PolicyBundle"
      }
    },
    "registry_hash": {
      "type": "string"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "PolicyBundle": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "hash": {
          "type": "string"
        },
        "hash_algorithm": {
          "type": "string",
          "default": "sha256"
        },
        "canonicalization": {
          "type": "string",
          "default": "json.sort_deep.v1"
        },
        "source": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "effective_at": {
          "type": "string"
        },
        "deprecated_at": {
          "type": "string"
        },
        "changelog": {
          "type": "string"
        },
        "content_hash": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }
  }
}