fix(openapi): declare the route samples a workout detail answers

WorkoutRouteGeometry.sampleTimestamps was declared as an array of strings. Both track ingests (the workout batch and the Apple Health export) store one object per point, { t, speedMs?, hr? }, and the detail answers them as stored. The response is unchanged; the contract now says what it holds.
This commit is contained in:
Marc-André Bombeck committed 2026-10-23 13:57:17 +02:00
1 parent 51835fe1d0
commit ab15096a6a
2 files changed
+29 -2

No files matched your search

+12 -1
View File
@@ -185,7 +185,18 @@ const workoutListResponse = z
const workoutRouteGeometry = z
.object({
geometry: z.unknown(),
sampleTimestamps: z.array(z.string()).nullable(),
sampleTimestamps: z
.array(
z.object({
t: isoDateTime(),
speedMs: z.number().optional(),
hr: z.number().int().optional(),
}),
)
.nullable()
.describe(
"One entry per geometry point, as the track was ingested: its instant and, where recorded, speed (m/s) and heart rate (bpm).",
),
})
.meta({ id: "WorkoutRouteGeometry" });