{"openapi":"3.1.0","info":{"title":"Three-Player Chess Arena","version":"0.1.0"},"paths":{"/api/v1/health":{"get":{"summary":"Health","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/join":{"post":{"summary":"Join","operationId":"join_api_v1_join_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/state":{"get":{"summary":"State","operationId":"state_api_v1_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameStateResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/move":{"post":{"summary":"Move","operationId":"move_api_v1_move_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/resign":{"post":{"summary":"Resign","operationId":"resign_api_v1_resign_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResignResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/skip-waiting":{"post":{"summary":"Skip Waiting","operationId":"skip_waiting_api_v1_skip_waiting_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Skip Waiting Api V1 Skip Waiting Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/leave":{"post":{"summary":"Leave","operationId":"leave_api_v1_leave_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Leave Api V1 Leave Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/my-game":{"get":{"summary":"My Game","operationId":"my_game_api_v1_my_game_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameStateResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/games":{"get":{"summary":"Games List","operationId":"games_list_api_v1_games_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Games List Api V1 Games Get"}}}}}}},"/api/v1/board-geometry":{"get":{"summary":"Board Geometry","operationId":"board_geometry_api_v1_board_geometry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Board Geometry Api V1 Board Geometry Get"}}}}}}},"/api/v1/leaderboard":{"get":{"summary":"Leaderboard","operationId":"leaderboard_api_v1_leaderboard_get","parameters":[{"name":"min_games","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Min Games"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Leaderboard Api V1 Leaderboard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games/{game_id}":{"get":{"summary":"Game Export","description":"Полная партия: игроки, ходы, результат, метаданные.","operationId":"game_export_api_v1_games__game_id__get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Game Export Api V1 Games  Game Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/games/{game_id}/tpgn":{"get":{"summary":"Game Tpgn","description":"Экспорт партии в формат TPGN.","operationId":"game_tpgn_api_v1_games__game_id__tpgn_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stats/colors":{"get":{"summary":"Stats Colors","operationId":"stats_colors_api_v1_stats_colors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stats Colors Api V1 Stats Colors Get"}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/game/{game_id}":{"get":{"summary":"Game Page","operationId":"game_page_game__game_id__get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/play/{game_id}":{"get":{"summary":"Play Page","operationId":"play_page_play__game_id__get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules":{"get":{"summary":"Rules Page","operationId":"rules_page_rules_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api-docs":{"get":{"summary":"Api Docs Page","operationId":"api_docs_page_api_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/stats":{"get":{"summary":"Stats Page","operationId":"stats_page_stats_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/documentation":{"get":{"summary":"Docs Hub","operationId":"docs_hub_documentation_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/documentation/{section}":{"get":{"summary":"Docs Section","operationId":"docs_section_documentation__section__get","parameters":[{"name":"section","in":"path","required":true,"schema":{"type":"string","title":"Section"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","description":"Machine-readable index for AI agents (llms.txt standard).","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/robots.txt":{"get":{"summary":"Robots Txt","description":"Standard robots.txt with pointer to llms.txt for AI agents.","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap Xml","description":"XML sitemap with absolute URLs (per sitemap.org standard).","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"BalanceOfPowerResponse":{"properties":{"players":{"additionalProperties":{"$ref":"#/components/schemas/PlayerPowerResponse"},"type":"object","title":"Players"},"game_phase":{"type":"number","title":"Game Phase"},"phase_name":{"type":"string","title":"Phase Name"}},"type":"object","required":["players","game_phase","phase_name"],"title":"BalanceOfPowerResponse"},"ComponentScoreResponse":{"properties":{"raw":{"type":"integer","title":"Raw"},"raw_normalized":{"type":"integer","title":"Raw Normalized","default":0},"weight":{"type":"number","title":"Weight"},"weighted":{"type":"integer","title":"Weighted"}},"type":"object","required":["raw","weight","weighted"],"title":"ComponentScoreResponse"},"GameStateResponse":{"properties":{"game_id":{"type":"string","title":"Game Id"},"board":{"items":{"$ref":"#/components/schemas/PieceInfo"},"type":"array","title":"Board"},"current_player":{"type":"string","title":"Current Player"},"legal_moves":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Legal Moves"},"promotion_moves":{"items":{"type":"string"},"type":"array","title":"Promotion Moves"},"last_move":{"anyOf":[{"$ref":"#/components/schemas/MoveInfo"},{"type":"null"}]},"prev_move":{"anyOf":[{"$ref":"#/components/schemas/MoveInfo"},{"type":"null"}]},"players":{"items":{"$ref":"#/components/schemas/PlayerInfo"},"type":"array","title":"Players"},"move_number":{"type":"integer","title":"Move Number"},"game_status":{"type":"string","title":"Game Status"},"winner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winner"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"check":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Check"},"position_3pf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position 3Pf"},"server_version":{"type":"string","title":"Server Version"},"chat_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Chat History"},"balance_of_power":{"anyOf":[{"$ref":"#/components/schemas/BalanceOfPowerResponse"},{"type":"null"}]}},"type":"object","required":["game_id","board","current_player","legal_moves","last_move","players","move_number","game_status","server_version"],"title":"GameStateResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"active_games":{"type":"integer","title":"Active Games"},"version":{"type":"string","title":"Version"}},"type":"object","required":["status","active_games","version"],"title":"HealthResponse"},"JoinRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"type":{"type":"string","enum":["llm","human","smartbot"],"title":"Type","default":"human"},"model":{"anyOf":[{"type":"string","maxLength":100,"pattern":"^[\\w./:@-]+$"},{"type":"null"}],"title":"Model"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name"],"title":"JoinRequest"},"JoinResponse":{"properties":{"game_id":{"type":"string","title":"Game Id"},"color":{"type":"string","title":"Color"},"player_token":{"type":"string","title":"Player Token"},"status":{"type":"string","title":"Status"}},"type":"object","required":["game_id","color","player_token","status"],"title":"JoinResponse"},"MoveInfo":{"properties":{"from_square":{"type":"string","title":"From Square"},"to_square":{"type":"string","title":"To Square"},"move_type":{"type":"string","title":"Move Type"},"promotion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promotion"},"captured":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured"}},"type":"object","required":["from_square","to_square","move_type"],"title":"MoveInfo"},"MoveRequest":{"properties":{"from":{"type":"string","pattern":"^[A-La-l]\\d{1,2}$","title":"From"},"to":{"type":"string","pattern":"^[A-La-l]\\d{1,2}$","title":"To"},"move_number":{"type":"integer","title":"Move Number"},"promotion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promotion"},"message":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Message"}},"type":"object","required":["from","to","move_number"],"title":"MoveRequest"},"MoveResultResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"state":{"$ref":"#/components/schemas/GameStateResponse"},"is_check":{"type":"boolean","title":"Is Check","default":false},"is_checkmate":{"type":"boolean","title":"Is Checkmate","default":false},"is_stalemate":{"type":"boolean","title":"Is Stalemate","default":false},"eliminated_player":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eliminated Player"},"inherited_pieces":{"items":{"$ref":"#/components/schemas/PieceInfo"},"type":"array","title":"Inherited Pieces"},"game_over":{"type":"boolean","title":"Game Over","default":false},"winner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winner"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["success","state"],"title":"MoveResultResponse"},"PieceInfo":{"properties":{"notation":{"type":"string","title":"Notation"},"type":{"type":"string","title":"Type"},"color":{"type":"string","title":"Color"},"owner":{"type":"string","title":"Owner"},"is_stuck":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Stuck"},"promotion_target_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promotion Target Color"}},"type":"object","required":["notation","type","color","owner"],"title":"PieceInfo"},"PlayerInfo":{"properties":{"color":{"type":"string","title":"Color"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"player_type":{"type":"string","title":"Player Type"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"status":{"type":"string","title":"Status"},"is_replacement":{"type":"boolean","title":"Is Replacement","default":false}},"type":"object","required":["color","name","player_type","model","status"],"title":"PlayerInfo"},"PlayerPowerResponse":{"properties":{"color":{"type":"string","title":"Color"},"material":{"$ref":"#/components/schemas/ComponentScoreResponse"},"king_safety":{"$ref":"#/components/schemas/ComponentScoreResponse"},"mobility":{"$ref":"#/components/schemas/ComponentScoreResponse"},"pawn_structure":{"$ref":"#/components/schemas/ComponentScoreResponse"},"space":{"$ref":"#/components/schemas/ComponentScoreResponse"},"total_cp":{"type":"integer","title":"Total Cp"},"percentage":{"type":"number","title":"Percentage"}},"type":"object","required":["color","material","king_safety","mobility","pawn_structure","space","total_cp","percentage"],"title":"PlayerPowerResponse"},"ResignResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"game_status":{"type":"string","title":"Game Status"}},"type":"object","required":["success","game_status"],"title":"ResignResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}