From 69fd40e0fb4ecb1525f1ddcca307d0739b7fd430 Mon Sep 17 00:00:00 2001 From: Edward Zhang Date: Sun, 16 Aug 2026 13:35:13 -0700 Subject: [PATCH] fix(api): avoid naming conflict in swagger_parser Confirmed that removed fields are never used by checking the git history for models/journey.dart in the frontend. Only the snake_case fields are used. --- src/services/journey.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/services/journey.ts b/src/services/journey.ts index a0552eb..0899be2 100644 --- a/src/services/journey.ts +++ b/src/services/journey.ts @@ -88,8 +88,6 @@ const formattedLegCommonFields = { startTime: z.number(), endTime: z.number(), duration: z.number(), - originID: z.string(), - destinationID: z.string(), }; const FormattedLegWalkSchema = z.object({ @@ -156,7 +154,7 @@ async function processJourneys( const isWalk = leg.type === 'Transfer'; let formattedLeg: FormattedLeg; - const formattedLegCommon = { + const formattedLegCommon = { origin_id: leg.origin, origin: leg.origin === 'VIRTUAL_ORIGIN' ? 'Start' : (leg.origin === 'VIRTUAL_DESTINATION' ? 'End' : (state.stopIdToName[leg.origin] || leg.origin)), destination_id: leg.destination, @@ -165,8 +163,6 @@ async function processJourneys( startTime: Math.round(leg.startTime), endTime: Math.round(leg.endTime), duration: Math.round(leg.duration), - originID: leg.originID, - destinationID: leg.destinationID, }; if (!isWalk) {