From 44bcc0c577933d4da28a69873dfda14fae6e2366 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 7877aae..4db4de0 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({ @@ -160,7 +158,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, @@ -169,8 +167,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) {