{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://www.realrate.gg","description":"Generated server url"}],"paths":{"/title/{identifier}/game-types/{gameTypeIdentifier}/default":{"put":{"tags":["title-controller"],"operationId":"setDefaultGameType","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameTypeIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/manage/{titleIdentifier}/settings":{"put":{"tags":["manage-controller"],"operationId":"updateSettings","parameters":[{"name":"titleIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/manage/{titleIdentifier}/game-types/order":{"put":{"tags":["manage-controller"],"operationId":"updateGameTypeOrder","parameters":[{"name":"titleIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/title":{"post":{"tags":["title-controller"],"operationId":"saveTitle","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TitleRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitleResponse"}}}}}}},"/title/search":{"post":{"tags":["title-controller"],"operationId":"searchTitles","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TitleFilter"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageTitleResponse"}}}}}}},"/player":{"post":{"tags":["player-controller"],"operationId":"savePlayer","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PlayerResponse"}}}}}}},"/player/search":{"post":{"tags":["player-controller"],"operationId":"searchPlayers","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerFilter"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagePlayerResponse"}}}}}}},"/manage/{titleIdentifier}/game-types/add":{"post":{"tags":["manage-controller"],"operationId":"addGameType","parameters":[{"name":"titleIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/manage/{titleIdentifier}/clients/generate":{"post":{"tags":["manage-controller"],"operationId":"generateClientKey","parameters":[{"name":"titleIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/manage/create":{"post":{"tags":["manage-controller"],"operationId":"createTitle","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TitleRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/game":{"post":{"tags":["game-controller"],"operationId":"saveGame","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GameResponse"}}}}}}},"/title/{identifier}":{"get":{"tags":["title-controller"],"operationId":"getTitle","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitleResponse"}}}}}},"delete":{"tags":["title-controller"],"operationId":"deleteTitle","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/leaderboard/{title}/{gameType}":{"get":{"tags":["rating-controller"],"operationId":"getLeaderboard","parameters":[{"name":"title","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameType","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageRankedPlayer"}}}}}}},"/embed/{title}/{gameType}.js":{"get":{"tags":["embed-controller"],"operationId":"getEmbedScript","parameters":[{"name":"title","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameType","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/javascript":{"schema":{"type":"string"}}}}}}},"/embed/{title}/{gameType}.html":{"get":{"tags":["embed-controller"],"operationId":"getEmbedHtml","parameters":[{"name":"title","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameType","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/health":{"get":{"tags":["health-controller"],"operationId":"health","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}}}}}},"/api/embed/leaderboard/{title}/{gameType}":{"get":{"tags":["embed-controller"],"operationId":"getEmbedLeaderboard","parameters":[{"name":"title","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameType","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/player/{playerId}":{"delete":{"tags":["player-controller"],"operationId":"deletePlayer","parameters":[{"name":"playerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/manage/{titleIdentifier}/clients/{clientId}":{"delete":{"tags":["manage-controller"],"operationId":"revokeClientKey","parameters":[{"name":"titleIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"clientId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"components":{"schemas":{"GameType":{"required":["identifier","name"],"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"description":{"maxLength":1000,"minLength":0,"type":"string"},"is_default":{"type":"boolean"},"sort_order":{"type":"integer","format":"int32"}}},"TitleRequest":{"required":["gameTypes","identifier","name"],"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"description":{"maxLength":1000,"minLength":0,"type":"string"},"logo":{"maxLength":1000,"minLength":0,"type":"string"},"website":{"maxLength":1000,"minLength":0,"type":"string"},"gameTypes":{"type":"array","items":{"$ref":"#/components/schemas/GameType"}}}},"TitleResponse":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"logo":{"type":"string"},"website":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"modifiedDate":{"type":"string","format":"date-time"},"gameTypes":{"type":"array","items":{"$ref":"#/components/schemas/GameType"}}}},"TitleFilter":{"type":"object","properties":{"quickSearch":{"type":"string"},"nameLike":{"type":"string"}}},"Pageable":{"type":"object","properties":{"page":{"minimum":0,"type":"integer","format":"int32"},"size":{"minimum":1,"type":"integer","format":"int32"},"sort":{"type":"array","items":{"type":"string"}}}},"PageTitleResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/TitleResponse"}},"number":{"type":"integer","format":"int32"},"sort":{"type":"array","items":{"$ref":"#/components/schemas/SortObject"}},"first":{"type":"boolean"},"last":{"type":"boolean"},"numberOfElements":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"PageableObject":{"type":"object","properties":{"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"offset":{"type":"integer","format":"int64"},"sort":{"type":"array","items":{"$ref":"#/components/schemas/SortObject"}},"paged":{"type":"boolean"},"unpaged":{"type":"boolean"}}},"SortObject":{"type":"object","properties":{"direction":{"type":"string"},"nullHandling":{"type":"string"},"ascending":{"type":"boolean"},"property":{"type":"string"},"ignoreCase":{"type":"boolean"}}},"PlayerRequest":{"required":["name","title"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"title":{"type":"string"}}},"PlayerResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"title":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"modifiedDate":{"type":"string","format":"date-time"}}},"PlayerFilter":{"type":"object","properties":{"playerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"playerNameLike":{"maxLength":2147483647,"minLength":2,"type":"string"}}},"PagePlayerResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/PlayerResponse"}},"number":{"type":"integer","format":"int32"},"sort":{"type":"array","items":{"$ref":"#/components/schemas/SortObject"}},"first":{"type":"boolean"},"last":{"type":"boolean"},"numberOfElements":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"GameRequest":{"required":["gameType","id","title"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"gameType":{"type":"string"},"winner":{"type":"string","format":"uuid"},"loser":{"type":"string","format":"uuid"},"winners":{"uniqueItems":true,"type":"array","items":{"type":"string","format":"uuid"}},"losers":{"uniqueItems":true,"type":"array","items":{"type":"string","format":"uuid"}}}},"GamePlayer":{"type":"object","properties":{"playerId":{"type":"string","format":"uuid"},"name":{"type":"string"},"beforeRating":{"type":"integer","format":"int32"},"ratingChange":{"type":"integer","format":"int32"},"afterRating":{"type":"integer","format":"int32"},"gameCount":{"type":"integer","format":"int32"},"winCount":{"type":"integer","format":"int32"}}},"GameResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"gameType":{"type":"string"},"players":{"type":"array","items":{"$ref":"#/components/schemas/GamePlayer"}},"postDate":{"type":"string","format":"date-time"}}},"PageRankedPlayer":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/RankedPlayer"}},"number":{"type":"integer","format":"int32"},"sort":{"type":"array","items":{"$ref":"#/components/schemas/SortObject"}},"first":{"type":"boolean"},"last":{"type":"boolean"},"numberOfElements":{"type":"integer","format":"int32"},"empty":{"type":"boolean"}}},"RankedPlayer":{"type":"object","properties":{"player_id":{"type":"string","format":"uuid"},"rank":{"type":"integer","format":"int64"},"name":{"type":"string"},"rating":{"type":"integer","format":"int32"},"game_count":{"type":"integer","format":"int32"},"win_rate":{"type":"number","format":"double"}}}}}}