fix(openapi): align schedule-for-route schema with ScheduleForRouteEn…#700
Conversation
|
Thanks @Adityatorgal17 for opening this! My refactor PR (#702) is currently failing conformance tests because of this schema mismatch. Looking forward to this getting merged so I can sync my branch. |
|
@tejasva-vardhan Glad the PR helps unblock your refactor. |
aaronbrethorst
left a comment
There was a problem hiding this comment.
Hey Aditya, good eye spotting this schema drift — keeping the OpenAPI spec in sync with the actual response structure is important for conformance testing and downstream consumers.
Summary
This PR removes the stops and trips fields from the ScheduleEntry schema in testdata/openapi.yml, aligning the spec with the actual ScheduleForRouteEntry Go struct which doesn't include those fields.
Feedback
No critical or important issues found.
Verification
I confirmed that ScheduleForRouteEntry in internal/models/schedule_for_route.go contains only routeId, scheduleDate, serviceIds, and stopTripGroupings — no stops or trips fields. The schema removal is correct.
- Tests: All passing
- Diff: Clean deletion-only change, no risk of breakage
Strengths
- Correctly identifies and fixes spec/implementation drift
- Minimal, targeted change — no scope creep
- Unblocks downstream work (#702)
This PR aligns OpenAPI schema with the current
schedule-for-routeresponse.fixes #699
What changed
ScheduleEntryintestdata/openapi.yml.stopsandtripsfrom:propertiesrequiredWhy
stops/tripswere removed fromScheduleForRouteEntryand handler output, buttestdata/openapi.ymlstill required them.Validation
make testpasses