Skip to content

fix(openapi): align schedule-for-route schema with ScheduleForRouteEn…#700

Merged
aaronbrethorst merged 1 commit intoOneBusAway:mainfrom
Adityatorgal17:fix/openapi-schedule-for-route-schema-alignment
Mar 13, 2026
Merged

fix(openapi): align schedule-for-route schema with ScheduleForRouteEn…#700
aaronbrethorst merged 1 commit intoOneBusAway:mainfrom
Adityatorgal17:fix/openapi-schedule-for-route-schema-alignment

Conversation

@Adityatorgal17
Copy link
Contributor

This PR aligns OpenAPI schema with the current schedule-for-route response.

fixes #699

What changed

  1. Updated ScheduleEntry in testdata/openapi.yml.
  2. Removed stops and trips from:
    • properties
    • required

Why

stops/trips were removed from ScheduleForRouteEntry and handler output, but testdata/openapi.yml still required them.

Validation

make test passes

@tejasva-vardhan
Copy link
Contributor

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.

@Adityatorgal17
Copy link
Contributor Author

@tejasva-vardhan Glad the PR helps unblock your refactor.

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@aaronbrethorst aaronbrethorst merged commit c13276b into OneBusAway:main Mar 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAPI conformance failure: schedule-for-route schema still requires removed stops/trips fields

3 participants