Files
julius_baer_onboarding/openapi.json

1 line
4.1 KiB
JSON
Raw Normal View History

2025-04-12 00:11:16 +02:00
{"openapi":"3.1.0","info":{"title":"Master","version":"0.1.0"},"paths":{"/game/start":{"post":{"summary":"Game Start","description":"Start a new game session for the player.","operationId":"game_start_game_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameStartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/game/decision":{"post":{"summary":"Game Decision","description":"Log decision, update the score and proceed with game.","operationId":"game_decision_game_decision_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameDecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"GameDecisionRequest":{"properties":{"decision":{"type":"string","enum":["Accept","Reject"],"title":"Decision","description":"Decision of the player.","example":"Accept"},"session_id":{"type":"string","format":"uuid","title":"Session Id","description":"Unique session ID for the game.","example":"6e8af95a-1819-4ac4-82b7-88846cf907cc"},"client_id":{"type":"string","format":"uuid","title":"Client Id","description":"Unique client ID for the game.","example":"2eb62743-b5e9-4225-b4b6-1ef4aaaf7813"}},"type":"object","required":["decision","session_id","client_id"],"title":"GameDecisionRequest"},"GameDecisionResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Status of the game after the decision.","example":"gameover"},"score":{"type":"integer","title":"Score","description":"Current score of the player.","example":1},"client_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Client Id","description":"Unique client ID for the game.","example":"71737c82-8123-47a1-bc22-4ecf47ac5d7d"},"client_data":{"type":"object","title":"Client Data","description":"Client data for the player.","example":{"passport":"123456789"}}},"type":"object","required":["status","score"],"title":"GameDecisionResponse"},"GameStartRequest":{"properties":{"player_name":{"type":"string","title":"Player Name","description":"Name of the player.","example":"Haligali"}},"type":"object","required":["player_name"],"title":"GameStartRequest"},"GameStartResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Message indicating the game has started.","example":"Game started successfully."},"session_id":{"type":"string","format":"uuid","title":"Session Id","description":"Unique session ID for the game.","example":"92ab2b1a-a3b5-4e36-af59-2d4083a18ee6"},"player_id":{"type":"string","title":"Player Id","description":"Unique player ID for the game.","example":"some_key"},"client_id":{"type":"string","format":"uuid","title":"Client Id","description":"Unique client ID for the game.","example":"42048bf6-5947-4797-bac9-348e23dcc904"},"client_data":{"type":"object","title":"Client Data","description":"Client data for the player.","example":{"data":{}}},"score":{"type":"integer","title":"Score","description":"Starting score of the player.","example":0}},"type":"object","required":["message","session_id","player_id","client_id","client_data","score"],"title":"GameStartResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type"