{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "attempt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[a-zA-Z0-9_-]+$"
    },
    "winner": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "at": {
              "type": "number"
            },
            "actor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reward": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "quest": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "attempt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    }
                  },
                  "required": ["quest", "attempt"]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["at", "actor", "reward"]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": ["attempt", "winner"]
}
