Flatten PlayerProfileResponse with top-level parent/team/coach fields #280
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#280
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Related to forgejo_admin/basketball-api#278 (spike: audit API response contract mismatches with westside-landing frontend)
Repo
forgejo_admin/basketball-api
User Story
As an admin/coach/parent, I want the app to display complete player, parent, and coach information so that I can manage the program without missing data.
Context
Spike Mismatch 1: The frontend expects
parent_name,parent_phone,parent_email,team_name,team_id,coach_nameas top-level fields on the player profile response. Currently these are only available nested inside related objects, forcing the frontend to drill into nested structures.The fix is to flatten
PlayerProfileResponseso these fields appear at the top level alongside the existing nested objects. This is additive — nested objects remain, top-level fields are added for convenience.File Targets
src/basketball_api/routes/players.py—PlayerProfileResponsemodel + endpoint logicAcceptance Criteria
PlayerProfileResponseincludesparent_name,parent_phone,parent_emailas top-levelOptional[str]fieldsPlayerProfileResponseincludesteam_nameas top-levelOptional[str],team_idasOptional[int]PlayerProfileResponseincludescoach_nameas top-levelOptional[str]Test Expectations
Constraints
Checklist
ruff formatandruff checkcleanRelated
Scope Review: READY
Review note:
review-740-2026-04-03Single-repo, single-file additive change. All file targets verified. PlayerProfileResponse at line 40 confirmed missing flattened fields.
[SCOPE]Create architecture note arch-basketball-api (shared across all mismatch tickets)