Skip to content

feat(stop_events): add ApiWeb.StopEventView#979

Open
runkelcorey wants to merge 3 commits intomasterfrom
feat-stop_event-view
Open

feat(stop_events): add ApiWeb.StopEventView#979
runkelcorey wants to merge 3 commits intomasterfrom
feat-stop_event-view

Conversation

@runkelcorey
Copy link
Contributor

Part 2 of disaggregating #973

Summary of changes

  1. Adds all attributes from Model.StopEvent to ApiWeb.StopEventView
  2. Defines relationships for stop, route, trip, and vehicle using out-of-the-box functionality
  3. Adds functionality for schedule relationship by widening State.Schedule.schedule_for and State.Schedule.schedule_for_many to accept a Model.StopEvent

A future PR will add the location for StopEvents along with the StopEventController. I think that's also the right place to test for included trip/stop/route/vehicle lookups that don't return results.

How were these changes validated?

  1. Wrote tests for ApiWeb.StopEventView

What questions should reviewers consider?

  1. Should we define any other attributes to return via include?
  2. Should I update the State.ScheduleTest to test a slightly wider type? I think the current tests are sufficient b/c the functionality doesn't really change

@runkelcorey runkelcorey requested a review from a team as a code owner March 18, 2026 21:33
@runkelcorey runkelcorey requested review from jadrian and removed request for a team March 18, 2026 21:33
@runkelcorey runkelcorey added enhancement New feature or request elixir Pull requests that update Elixir code labels Mar 18, 2026
@runkelcorey runkelcorey self-assigned this Mar 18, 2026
@runkelcorey runkelcorey requested review from EmmaSimon and huangh March 18, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

elixir Pull requests that update Elixir code enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant