From 1735205096b345f19abdf138d58b2da53d147dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 14 Jun 2026 20:54:49 +0200 Subject: [PATCH] Add bpInTargetCount90/SpanDays90 to snapshot extras OpenAPI buildExtras emits bpInTargetCount90 + bpInTargetSpanDays90, but the registered extras schema (additionalProperties: false) omitted them, so a strict iOS decoder would reject the dashboard snapshot. Declare both as nullable integers to match the runtime shape and regenerate the spec. --- docs/api/openapi.yaml | 14 ++++++++++++++ src/lib/openapi/routes/insights.ts | 2 ++ 2 files changed, 16 insertions(+) diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml index aa1883989..67dfa39f3 100644 --- a/docs/api/openapi.yaml +++ b/docs/api/openapi.yaml @@ -13879,6 +13879,18 @@ components: anyOf: - type: number - type: "null" + bpInTargetCount90: + anyOf: + - type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + - type: "null" + bpInTargetSpanDays90: + anyOf: + - type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + - type: "null" glucoseByContext: type: object propertyNames: @@ -13893,6 +13905,8 @@ components: - bpInTargetPctAllTime - bpInTargetPctPriorMonth - bpInTargetPctPriorYear + - bpInTargetCount90 + - bpInTargetSpanDays90 - glucoseByContext - glucoseClinical additionalProperties: false diff --git a/src/lib/openapi/routes/insights.ts b/src/lib/openapi/routes/insights.ts index c2f88ad6d..50b76f99a 100644 --- a/src/lib/openapi/routes/insights.ts +++ b/src/lib/openapi/routes/insights.ts @@ -661,6 +661,8 @@ const dashboardSnapshotResponse = z bpInTargetPctAllTime: z.number().nullable(), bpInTargetPctPriorMonth: z.number().nullable(), bpInTargetPctPriorYear: z.number().nullable(), + bpInTargetCount90: z.number().int().nullable(), + bpInTargetSpanDays90: z.number().int().nullable(), glucoseByContext: dataSummaryRecord, glucoseClinical: glucoseClinicalSchema, })