{
    "openapi": "3.1.2",
    "info": {
        "title": "Leaderboard API",
        "version": "1.0.0",
        "description": "A REST API for game leaderboards, built with Laravel 13. Players sign up, register games and submit\nscores; anyone can read ranked leaderboards for all time, the last week or the last day.\n\n**Try it in three steps**\n\n1. Call `POST \/v1\/auth\/login` with the demo account below (or `POST \/v1\/auth\/register` to create your own).\n2. Copy the `token` from the response and click **Authorize** at the top of the page.\n3. Submit a score with `POST \/v1\/games\/{game}\/scores`, then see where you rank with `GET \/v1\/games\/{game}\/standing`.\n\nDemo account: `demo@example.com` \/ `password1` (device name: anything, e.g. `swagger`).\n\nDemo games: `run-for-life` (highest score wins), `king-of-hearts` (lowest time in ms wins), `infinite-xo`.\n\nSource code: [gitlab.com\/mihainem\/leaderboard-api](https:\/\/gitlab.com\/mihainem\/leaderboard-api)"
    },
    "servers": [
        {
            "url": "https:\/\/api.xlant.pro\/api"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/v1\/auth\/register": {
            "post": {
                "operationId": "v1.auth.register",
                "description": "Create a player account. Returns an API token to send as `Authorization: Bearer <token>`.",
                "summary": "Register",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/RegisterRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "token": {
                                            "type": "string"
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "const": "Bearer"
                                        },
                                        "user": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        }
                                    },
                                    "required": [
                                        "token",
                                        "token_type",
                                        "user"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/auth\/login": {
            "post": {
                "operationId": "v1.auth.login",
                "description": "Exchange email and password for a new API token. Limited to 5 attempts per minute.",
                "summary": "Log in",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/LoginRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "token": {
                                            "type": "string"
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "const": "Bearer"
                                        },
                                        "user": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        }
                                    },
                                    "required": [
                                        "token",
                                        "token_type",
                                        "user"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/auth\/me": {
            "get": {
                "operationId": "v1.auth.me",
                "description": "The player the token belongs to, including their email address.",
                "summary": "Current player",
                "tags": [
                    "Auth"
                ],
                "responses": {
                    "200": {
                        "description": "`UserResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/auth\/logout": {
            "post": {
                "operationId": "v1.auth.logout",
                "description": "Revoke the token used for this request.",
                "summary": "Log out",
                "tags": [
                    "Auth"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/games": {
            "get": {
                "operationId": "v1.games.index",
                "description": "All games, newest first, 15 per page.",
                "summary": "List games",
                "tags": [
                    "Game"
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `GameResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/GameResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "post": {
                "operationId": "v1.games.store",
                "description": "The slug is generated from the name. `score_order` is `desc` when the highest score wins, `asc` when the lowest wins.",
                "summary": "Create a game",
                "tags": [
                    "Game"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreGameRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`GameResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/GameResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "owner"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/games\/{game}": {
            "get": {
                "operationId": "v1.games.show",
                "summary": "Show a game",
                "tags": [
                    "Game"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "description": "The game slug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`GameResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/GameResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "owner"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            },
            "patch": {
                "operationId": "v1.games.update",
                "description": "Only the player who created the game may update it.",
                "summary": "Update a game",
                "tags": [
                    "Game"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "description": "The game slug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateGameRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`GameResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/GameResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "owner"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.games.destroy",
                "description": "Only the player who created the game may delete it. Its scores are deleted too.",
                "summary": "Delete a game",
                "tags": [
                    "Game"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "description": "The game slug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/v1\/games\/{game}\/leaderboard": {
            "get": {
                "operationId": "v1.games.leaderboard",
                "description": "Each player's best score, ranked. Players with equal scores share a rank (1, 1, 3).\nFilter with `period` (`all`, `week`, `day`) and limit the entries with `limit` (1\u2013100, default 10).",
                "summary": "Leaderboard",
                "tags": [
                    "Leaderboard"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "description": "The game slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "period",
                        "in": "query",
                        "schema": {
                            "$ref": "#\/components\/schemas\/LeaderboardPeriod"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "game": {
                                            "$ref": "#\/components\/schemas\/GameResource"
                                        },
                                        "period": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/LeaderboardEntryResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "game",
                                        "period",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/games\/{game}\/scores": {
            "get": {
                "operationId": "v1.games.scores.index",
                "description": "The latest scores submitted for a game, newest first, 20 per page.",
                "summary": "Recent scores",
                "tags": [
                    "Score"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "description": "The game slug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ScoreResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#\/components\/schemas\/ScoreResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "player"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            },
            "post": {
                "operationId": "v1.games.scores.store",
                "description": "Records a score for the signed-in player and returns their all-time standing. Limited to 30 per minute.",
                "summary": "Submit a score",
                "tags": [
                    "Score"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "description": "The game slug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreScoreRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/ScoreResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "player"
                                                    ]
                                                }
                                            ]
                                        },
                                        "standing": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "rank": {
                                                    "type": "integer"
                                                },
                                                "score": {
                                                    "type": "integer"
                                                },
                                                "players": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "rank",
                                                "score",
                                                "players"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "standing"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/games\/{game}\/standing": {
            "get": {
                "operationId": "v1.games.standing",
                "description": "The signed-in player's rank and best score for all time, the last week and the last day.\nA period is `null` if the player has no score in it.",
                "summary": "My standing",
                "tags": [
                    "Score"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "description": "The game slug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "GameResource": {
                "type": "object",
                "properties": {
                    "slug": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "score_order": {
                        "$ref": "#\/components\/schemas\/ScoreOrder"
                    },
                    "owner": {
                        "$ref": "#\/components\/schemas\/UserResource"
                    },
                    "scores_count": {
                        "type": "integer"
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "self": {
                                "type": "string"
                            },
                            "leaderboard": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "self",
                            "leaderboard"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "slug",
                    "name",
                    "description",
                    "score_order",
                    "links",
                    "created_at"
                ],
                "title": "GameResource"
            },
            "LeaderboardEntryResource": {
                "type": "object",
                "properties": {
                    "rank": {
                        "type": "integer"
                    },
                    "score": {
                        "type": "integer"
                    },
                    "player": {
                        "$ref": "#\/components\/schemas\/UserResource"
                    }
                },
                "required": [
                    "rank",
                    "score",
                    "player"
                ],
                "title": "LeaderboardEntryResource"
            },
            "LeaderboardPeriod": {
                "type": "string",
                "enum": [
                    "all",
                    "week",
                    "day"
                ],
                "title": "LeaderboardPeriod"
            },
            "LoginRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "password": {
                        "type": "string"
                    },
                    "device_name": {
                        "type": "string",
                        "maxLength": 100
                    }
                },
                "required": [
                    "email",
                    "password",
                    "device_name"
                ],
                "title": "LoginRequest"
            },
            "RegisterRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 50
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255
                    },
                    "password": {
                        "type": "string"
                    },
                    "device_name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "password_confirmation": {
                        "type": "string"
                    }
                },
                "required": [
                    "name",
                    "email",
                    "password",
                    "device_name",
                    "password_confirmation"
                ],
                "title": "RegisterRequest"
            },
            "ScoreOrder": {
                "type": "string",
                "description": "Whether a higher or a lower score ranks first.\n",
                "enum": [
                    "desc",
                    "asc"
                ],
                "title": "ScoreOrder"
            },
            "ScoreResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "value": {
                        "type": "integer"
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "player": {
                        "$ref": "#\/components\/schemas\/UserResource"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "value",
                    "metadata",
                    "created_at"
                ],
                "title": "ScoreResource"
            },
            "StoreGameRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000
                    },
                    "score_order": {
                        "$ref": "#\/components\/schemas\/ScoreOrder"
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreGameRequest"
            },
            "StoreScoreRequest": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000000
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Free-form extras such as the level or character, kept small.",
                        "items": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 100
                        },
                        "maxItems": 10
                    }
                },
                "required": [
                    "value"
                ],
                "title": "StoreScoreRequest"
            },
            "UpdateGameRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000
                    },
                    "score_order": {
                        "$ref": "#\/components\/schemas\/ScoreOrder"
                    }
                },
                "title": "UpdateGameRequest"
            },
            "UserResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "description": "Only the account owner sees their own email address."
                    }
                },
                "required": [
                    "id",
                    "name"
                ],
                "title": "UserResource"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}