feat/response schemas#88
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Benji918
approved these changes
May 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
During a review of the codebase, several endpoints were identified as returning untyped raw dicts with no declared response schema. This meant Swagger documented
dataasAnyacross those endpoints, giving the frontend team no contract to work against. This PR adds typed Pydantic response schemas for all affected endpoints and wires them into the route decorators viaresponse_model=APIResponse[T]so Swagger correctly documents the full response envelope including thedatafield.Type of Change
feat— New featurerefactor— Code refactoring (no functional change)Related Issue
Closes #
Changes Made
app/schemas/dashboard.pywithCompletedInterviewItem,ScheduledInterviewItem,DashboardLiveInterviewItem,DashboardOverviewResponseapp/schemas/calendar.pywithCalendarUserItem,AvailabilitySlotapp/schemas/candidate.pywithCandidateListItemapp/schemas/interview.pywithInterviewSummaryDetailResponse,InterviewSessionStatusResponse,ScorecardSection,InterviewScorecardResponse,CandidateProfileDetail,InterviewProfileDetail,InterviewProfileResponse,InterviewConfirmResponse,TranscriptStopResponse,CriteriaUpdateResponse,ContextUpdateResponse,AIConfigUpdateResponse,RejoinSessionResponseapp/services/dashboard.py—get_completed()andget_schedule()now return typed lists instead oflist[dict]app/services/interview.py— all affected service methods now return typed Pydantic models instead of raw dictsapp/api/v1/routes/dashboard.py— addedresponse_model=APIResponse[T]to all endpointsapp/api/v1/routes/calendar.py— addedresponse_model=APIResponse[T]to all endpointsapp/api/v1/routes/candidates.py— addedresponse_model=APIResponse[T]to all endpointsapp/api/v1/routes/interviews.py— addedresponse_model=APIResponse[T]to all affected endpointstests/test_schemas.py— smoke tests validating every new schema against real-shaped dataProof of Work
API Response / Screenshots
Test Cases
test_completed_interview_itemtest_scheduled_interview_itemtest_dashboard_live_interview_itemtest_calendar_user_itemtest_availability_slottest_candidate_list_itemtest_interview_summary_detail_responsetest_scorecard_section_and_responsetest_interview_profile_responsetest_interview_confirm_responsetest_criteria_update_responsetest_context_update_responsetest_ai_config_update_responsetest_transcript_stop_responsetest_session_status_responsetest_rejoin_session_responseTest output
Checklist
feat/response-schemas)uv run pytest)