Skip to content

feat(api): add clients generated from openapi specs; refactor: move busrouteline computation to backend - #105

Draft
jumpy-cat wants to merge 3 commits into
navigation-hubfrom
generated-clients
Draft

feat(api): add clients generated from openapi specs; refactor: move busrouteline computation to backend#105
jumpy-cat wants to merge 3 commits into
navigation-hubfrom
generated-clients

Conversation

@jumpy-cat

@jumpy-cat jumpy-cat commented Aug 5, 2026

Copy link
Copy Markdown
Member

Description

Been working on end-to-end typesafety between the frontend and the backend, this PR adds the beginnings of that and trials it on the getAllRoutes and getAllRideRoutes routes that I needed to change anyway (moving the logic to the backend, also in this PR, see #98).

To run the frontend you will need to define an extra environment variable BACKEND_OPENAPI_URL, which would have a value similar to what you'd set BACKEND_URL to but without the extra /mbus/api/v3 at the end. Note that the url would have to point at a backend that matches the openapi spec (as of right now neither the production backend nor the mock backend, you'd have to run the nav/plan-journey-bus-polylines backend yourself). You will also have to generate the clients first, the ci file should have an up to date version of the commands needed.

It should look something like this (full clean & regenerate):

rm -rf lib/backend
dart run build_runner clean
dart run swagger_parser
dart run build_runner build

Type of Change

  • New feature (feat)
  • Bug fix (fix)
  • Refactor / code improvement
  • Dependency / build update
  • Documentation
  • Other (explain)

Related Issues

Prereq of how I'd like to do #98
Depends on mbusdev/mbus-backend-dev#47

Changes Made

Testing Done

Flutter:

  • Tested on:
    • iOS Simulator
    • Android Emulator (I uncommented a line to reenable the base routes layer and confirmed they still show up)
    • Physical device

Screenshots / Demo (if UI or notification change)

routes still show up! (using locally running backend)
Screenshot_20260725_185715

Checklist

  • Commit messages follow Conventional Commits
  • PR title follows [type](scope): short description
  • PR target branch is not main and is our current working update branch (e.g. maizebus2.1)
  • No print() / debugPrint() / console.log() left in production code
  • Secrets / keys not committed

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.

1 participant