mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 06:32:03 +00:00
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:
1 parent
51835fe1d0
commit
ab15096a6a
2 files changed
+29
-2
No files matched your search
@@ -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" });
|
||||
|
||||
|
||||
Reference in new issue
Block a user