Create requests/responses models from OpenAPI JSON file

This commit is contained in:
dylan
2025-04-12 01:18:07 +02:00
parent 85cb71713a
commit 499bfe5971
4 changed files with 55 additions and 0 deletions

23
models/responses.py Normal file
View File

@ -0,0 +1,23 @@
from dataclasses import dataclass
from typing import Dict, Optional, Any
from uuid import UUID
@dataclass
class GameStartResponse:
"""Response model for a new game started."""
message: str
session_id: UUID
player_id: str
client_id: UUID
client_data: Dict[str, Any]
score: int
@dataclass
class GameDecisionResponse:
"""Response model for a game decision result."""
status: str
score: int
client_id: Optional[UUID] = None
client_data: Optional[Dict[str, Any]] = None