{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://bendyline.com/gezk/0.5/schemas/registry-index.schema.json",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "const": "gezk-registry"
    },
    "formatVersion": {
      "type": "string",
      "const": "0.5"
    },
    "publisher": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ]
    },
    "generatedAt": {
      "type": "string"
    },
    "catalogs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "catalogId": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$"
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "minLength": 2
          },
          "documents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "archiveBytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "contentDigest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "license": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "attributionRequired": {
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "attributionRequired"
            ]
          },
          "sourceSnapshot": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "date": {
                "type": "string"
              },
              "taxonomyVersion": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "date"
            ]
          }
        },
        "required": [
          "catalogId",
          "version",
          "name",
          "language",
          "documents",
          "archiveBytes",
          "contentDigest",
          "url",
          "license"
        ]
      }
    },
    "signature": {
      "type": "object",
      "properties": {
        "algorithm": {
          "type": "string",
          "const": "ed25519"
        },
        "keyId": {
          "type": "string",
          "minLength": 1
        },
        "canonicalization": {
          "type": "string",
          "const": "rfc8785"
        },
        "value": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "algorithm",
        "keyId",
        "canonicalization",
        "value"
      ]
    }
  },
  "required": [
    "kind",
    "formatVersion",
    "publisher",
    "generatedAt",
    "catalogs"
  ]
}
