Context
Backend schema audit found 39% of endpoints (25/64) lack proper response_model annotations, returning dict[str, Any]. This produces unknown types in the generated TypeScript SDK.
Additionally, 11 endpoints accept raw dict[str, Any] request bodies instead of Pydantic models.
High-priority endpoints needing response models
- GET /character/{id} — should use existing CharacterSheet
- POST /character/{id}/level-up — should use existing LevelUpResponse
- POST /dice/roll — create DiceRollResponse
- GET /campaign/templates — use CampaignListResponse
- All session endpoints (10 routes) — create typed models
- All combat init/turn endpoints (4 routes) — create typed models
High-priority endpoints needing request models
- POST /combat/initialize — create CombatInitializeRequest
- POST /combat/{id}/turn — create CombatTurnRequest
- POST /campaign/generate-world — create GenerateWorldRequest
- POST /session/{id}/action — create PlayerActionRequest
Tasks
Context
Backend schema audit found 39% of endpoints (25/64) lack proper response_model annotations, returning dict[str, Any]. This produces unknown types in the generated TypeScript SDK.
Additionally, 11 endpoints accept raw dict[str, Any] request bodies instead of Pydantic models.
High-priority endpoints needing response models
High-priority endpoints needing request models
Tasks