Add graduating_class to roster API response model #71
No reviewers
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!71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "70-add-graduating-class-to-roster-api"
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?
Summary
The
RosterPlayerPydantic model was missinggraduating_class, causing the SvelteKit dashboard to showundefinedfor every player card. ThePlayerSQLAlchemy model already has this field asString(10), so this maps it through to the JSON API response asstr | None.Changes
src/basketball_api/routes/tryouts.py-- Addedgraduating_class: str | Noneto theRosterPlayerPydantic model andgraduating_class=p.graduating_classto the constructor inapi_roster().tests/test_tryouts.py-- Addedgraduating_classparameter to the_create_playertest helper. Addedtest_graduating_class_returned_when_setandtest_graduating_class_null_when_unsettests. Updatedtest_all_fields_presentexpected fields set to includegraduating_class.Test Plan
pytest tests/test_tryouts.py -k "TestApiRoster" -v-- all 18 tests passpytest-- all 139 tests passruff check src/ tests/-- cleanruff format --check src/ tests/-- cleanReview Checklist
graduating_classcolumn on Player model)str | None)Related
plan-2026-03-08-tryout-prep(traceability)Closes #70