{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "badge": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "default": "",
                "type": "string",
                "maxLength": 1000
              },
              "image": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "key": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["name", "description", "image", "id", "key"]
          },
          "awardedAt": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": ["badge", "awardedAt"]
      }
    }
  },
  "required": ["items"]
}
