{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "leaderboard",
  "description": "Sıralama tablosu.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "version",
    "entries"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "leaderboard"
      ]
    },
    "version": {
      "type": "integer",
      "enum": [
        1
      ]
    },
    "tone": {
      "type": "string",
      "enum": [
        "neutral",
        "success",
        "warning",
        "danger",
        "brand"
      ]
    },
    "brand_color": {
      "type": "string",
      "enum": [
        "mavi",
        "turuncu",
        "mor",
        "pembe",
        "altin",
        "yesil",
        "turkuaz"
      ]
    },
    "title": {
      "type": "string",
      "maxLength": 80
    },
    "unit": {
      "type": "string",
      "maxLength": 16
    },
    "entries": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "rank": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000000
          },
          "name": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1
          },
          "score": {
            "type": "number",
            "minimum": -1000000000000.0,
            "maximum": 1000000000000.0
          },
          "is_you": {
            "type": "boolean"
          },
          "avatar": {
            "type": "string",
            "pattern": "^(https://[^\\s\\x00-\\x1f\\x7f]{1,2040}|[A-Za-z0-9_.:-]{8,256})$",
            "x-inki-medya": "photo",
            "description": "Telegram sözleşmesi: file_id ya da https URL (sunucu egress ile indirip yeniden barındırır)"
          },
          "brand_color": {
            "type": "string",
            "enum": [
              "mavi",
              "turuncu",
              "mor",
              "pembe",
              "altin",
              "yesil",
              "turkuaz"
            ]
          }
        },
        "required": [
          "rank",
          "name",
          "score"
        ]
      }
    }
  }
}
