{
  "openapi": "3.1.0",
  "info": {
    "title": "GameWard — API publique des résultats Fortnite",
    "version": "1.0.0",
    "description": "API en lecture seule : cups Fortnite suivies par la régie GameWard (catalogue, classements, parties, joueurs GameWard) et planning. Documentation complète : https://api.ftn.gameward.fr/v1/docs"
  },
  "servers": [
    {
      "url": "https://api.ftn.gameward.fr/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Service"
    },
    {
      "name": "Cups"
    },
    {
      "name": "Joueurs"
    },
    {
      "name": "Planning"
    }
  ],
  "paths": {
    "/ping": {
      "get": {
        "tags": [
          "Service"
        ],
        "operationId": "ping",
        "summary": "Vérifie la clé et l'état du service",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "string"
                    },
                    "serverTime": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "rateLimitPerMinute": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        }
      }
    },
    "/roster": {
      "get": {
        "tags": [
          "Joueurs"
        ],
        "operationId": "getRoster",
        "summary": "Joueurs du roster GameWard",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RosterPlayer"
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        }
      }
    },
    "/cups": {
      "get": {
        "tags": [
          "Cups"
        ],
        "operationId": "listCups",
        "summary": "Catalogue des cups",
        "description": "Cups à venir d'abord (ordre du nom), puis jouées de la plus récente à la plus ancienne.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filtre, valeurs séparées par des virgules : `upcoming`, `live`, `finished`.",
            "example": "live,finished"
          },
          {
            "name": "season",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "example": 43
          },
          {
            "name": "family",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`fncs`, `cash`, `perf`, `reload`, `console`… (virgules).",
            "example": "fncs,cash"
          },
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`solo`, `duo`, `trio`, `squad` (virgules)."
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Date (heure de Paris) minimale, AAAA-MM-JJ."
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Date (heure de Paris) maximale, AAAA-MM-JJ."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 50
            },
            "description": "Nombre d'éléments par page (1 à 500)."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Index du premier élément (pagination). Utilisez `pagination.nextOffset`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Cup"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/cups/live": {
      "get": {
        "tags": [
          "Cups"
        ],
        "operationId": "getLiveCup",
        "summary": "Cup suivie en direct par la régie",
        "description": "`data` vaut `null` si la régie ne suit aucune cup.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/LiveCup"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamBusy"
          }
        }
      }
    },
    "/cups/{eventId}/{windowId}": {
      "get": {
        "tags": [
          "Cups"
        ],
        "operationId": "getCup",
        "summary": "Résumé d'une cup",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "epicgames_S43_FNCSSoloReload_Final_EU"
          },
          {
            "name": "windowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "S43_FNCSSoloReload_Final_EU"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CupSummary"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamBusy"
          }
        }
      }
    },
    "/cups/{eventId}/{windowId}/leaderboard": {
      "get": {
        "tags": [
          "Cups"
        ],
        "operationId": "getLeaderboard",
        "summary": "Classement d'une cup",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "epicgames_S43_FNCSSoloReload_Final_EU"
          },
          {
            "name": "windowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "S43_FNCSSoloReload_Final_EU"
          },
          {
            "name": "gameward",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "`true` : seulement les équipes avec un joueur GameWard."
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filtre sur le pseudo (contient, sans casse) ou l'epicId exact."
          },
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "games"
              ]
            },
            "description": "`games` : ajoute le détail partie par partie de chaque équipe."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "description": "Nombre d'éléments par page (1 à 500)."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Index du premier élément (pagination). Utilisez `pagination.nextOffset`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "pagination"
                      ],
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Team"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "cup": {
                          "$ref": "#/components/schemas/Cup"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamBusy"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/cups/{eventId}/{windowId}/gameward": {
      "get": {
        "tags": [
          "Cups"
        ],
        "operationId": "getCupGameward",
        "summary": "Équipes GameWard d'une cup, avec leurs parties",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "epicgames_S43_FNCSSoloReload_Final_EU"
          },
          {
            "name": "windowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "S43_FNCSSoloReload_Final_EU"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TeamWithGames"
                      }
                    },
                    "cup": {
                      "$ref": "#/components/schemas/Cup"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamBusy"
          }
        }
      }
    },
    "/players/{epicId}/results": {
      "get": {
        "tags": [
          "Joueurs"
        ],
        "operationId": "getPlayerResults",
        "summary": "Résultats d'un joueur GameWard, cup par cup",
        "parameters": [
          {
            "name": "epicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "d038d3b7a13d4323b2ebca05644d9124"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 50
            },
            "description": "Nombre d'éléments par page (1 à 500)."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Index du premier élément (pagination). Utilisez `pagination.nextOffset`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "pagination"
                      ],
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PlayerResult"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "player": {
                          "$ref": "#/components/schemas/RosterPlayerShort"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/planning": {
      "get": {
        "tags": [
          "Planning"
        ],
        "operationId": "getPlanning",
        "summary": "Planning des cups castées",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Défaut : aujourd'hui (Paris)."
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "description": "Nombre d'éléments par page (1 à 500)."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Index du premier élément (pagination). Utilisez `pagination.nextOffset`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "pagination"
                      ],
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PlanningEvent"
                          }
                        },
                        "pagination": {
                          "$ref": "#/components/schemas/Pagination"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "304": {
            "description": "Non modifié (en-tête `If-None-Match` égal à l'ETag courant). Corps vide."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Clé API `gwp_…` créée depuis le portail (accueil → Clés API)."
      }
    },
    "headers": {
      "ETag": {
        "schema": {
          "type": "string"
        },
        "description": "Empreinte de la réponse ; renvoyez-la dans `If-None-Match`."
      },
      "CacheControl": {
        "schema": {
          "type": "string"
        },
        "description": "`private, max-age=N` : durée pendant laquelle la réponse peut être réutilisée."
      },
      "RateLimit": {
        "schema": {
          "type": "integer"
        },
        "description": "Requêtes autorisées par minute pour la clé."
      },
      "RateRemaining": {
        "schema": {
          "type": "integer"
        },
        "description": "Requêtes restantes dans la fenêtre glissante de 60 s."
      },
      "RateReset": {
        "schema": {
          "type": "integer"
        },
        "description": "Secondes avant qu'une place se libère."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Paramètre invalide (`bad_request`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Clé absente, inconnue ou révoquée (`unauthorized`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Cup ou joueur inconnu (`not_found`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Limite de débit atteinte (`rate_limited`) ; voir l'en-tête `Retry-After`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Internal": {
        "description": "Erreur interne (`internal_error`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "UpstreamError": {
        "description": "Source des résultats injoignable (`upstream_error`) ; voir `Retry-After`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "UpstreamBusy": {
        "description": "Cup pas encore en cache pendant un direct (`upstream_busy`) ; voir `Retry-After`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "bad_request",
                  "unauthorized",
                  "not_found",
                  "rate_limited",
                  "internal_error",
                  "upstream_error",
                  "upstream_busy",
                  "unavailable"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "Pagination": {
        "type": "object",
        "required": [
          "total",
          "limit",
          "offset",
          "nextOffset"
        ],
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "nextOffset": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "RosterPlayerShort": {
        "type": "object",
        "properties": {
          "epicId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "RosterPlayer": {
        "type": "object",
        "properties": {
          "epicId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "links": {
            "type": "object",
            "properties": {
              "results": {
                "type": "string"
              }
            }
          }
        }
      },
      "Cup": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string"
          },
          "windowId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "family": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "phase": {
            "type": [
              "string",
              "null"
            ]
          },
          "isFinal": {
            "type": "boolean"
          },
          "season": {
            "type": [
              "integer",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "mode": {
            "type": [
              "string",
              "null"
            ]
          },
          "teamSize": {
            "type": [
              "integer",
              "null"
            ]
          },
          "modeIsGuess": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "upcoming",
              "live",
              "finished"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "firstGameEndedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resultsFinal": {
            "type": "boolean"
          },
          "isFollowedLive": {
            "type": "boolean"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "leaderboard": {
                "type": "string"
              },
              "gameward": {
                "type": "string"
              },
              "fortniteTracker": {
                "type": "string"
              }
            }
          }
        }
      },
      "Player": {
        "type": "object",
        "properties": {
          "epicId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "isGameward": {
            "type": "boolean"
          }
        }
      },
      "TeamStats": {
        "type": "object",
        "properties": {
          "gamesPlayed": {
            "type": "integer"
          },
          "kills": {
            "type": "integer"
          },
          "wins": {
            "type": "integer"
          },
          "bestPlacement": {
            "type": [
              "integer",
              "null"
            ]
          },
          "averagePlacement": {
            "type": [
              "number",
              "null"
            ]
          },
          "damageDealt": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "Game": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer"
          },
          "placement": {
            "type": [
              "integer",
              "null"
            ]
          },
          "kills": {
            "type": "integer"
          },
          "points": {
            "type": "integer"
          },
          "victory": {
            "type": "boolean"
          },
          "timeAliveSeconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "damageDealt": {
            "type": [
              "integer",
              "null"
            ]
          },
          "damageTaken": {
            "type": [
              "integer",
              "null"
            ]
          },
          "live": {
            "type": "boolean"
          },
          "endedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Team": {
        "type": "object",
        "properties": {
          "rank": {
            "type": [
              "integer",
              "null"
            ]
          },
          "points": {
            "type": "integer"
          },
          "teamId": {
            "type": "string"
          },
          "isGameward": {
            "type": "boolean"
          },
          "players": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Player"
            }
          },
          "stats": {
            "$ref": "#/components/schemas/TeamStats"
          },
          "games": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Game"
            },
            "description": "Présent avec `include=games`."
          }
        }
      },
      "TeamWithGames": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Team"
          },
          {
            "type": "object",
            "properties": {
              "teamsCount": {
                "type": "integer"
              }
            }
          }
        ]
      },
      "CupSummary": {
        "type": "object",
        "properties": {
          "cup": {
            "$ref": "#/components/schemas/Cup"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "teamsCount": {
            "type": "integer"
          },
          "gamesPlayedMax": {
            "type": "integer"
          },
          "top": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Team"
            }
          },
          "gameward": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamWithGames"
            }
          }
        }
      },
      "LiveCup": {
        "type": "object",
        "properties": {
          "cup": {
            "$ref": "#/components/schemas/Cup"
          },
          "gamesTotal": {
            "type": [
              "integer",
              "null"
            ]
          },
          "broadcastDelaySeconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "teamsCount": {
            "type": "integer"
          },
          "top": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Team"
            }
          },
          "gameward": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamWithGames"
            }
          }
        }
      },
      "PlayerResult": {
        "type": "object",
        "properties": {
          "cup": {
            "$ref": "#/components/schemas/Cup"
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ]
          },
          "points": {
            "type": "integer"
          },
          "teamsCount": {
            "type": "integer"
          },
          "teammates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Player"
            }
          },
          "stats": {
            "$ref": "#/components/schemas/TeamStats"
          }
        }
      },
      "PlanningEvent": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "start": {
            "type": [
              "string",
              "null"
            ]
          },
          "end": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "cup": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "eventId": {
                    "type": "string"
                  },
                  "windowId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "match": {
                    "type": "string",
                    "enum": [
                      "session",
                      "event"
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}