mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 22:32:04 +00:00
chore(openapi): document date-time fields as offset-bearing ISO-8601
v1.4.25 W7 phase 3.4 — proposal §3 symptom 10.
The schema patterns on every 'format: date-time' field already
accept both 'Z' and '±HH:MM' suffixes (the Zod sources use
{ offset: true }), so the wire contract is technically correct. The
discoverability problem is that consumers reading the spec assume
'date-time' implies UTC.
Adds an explicit 'Date-time contract' paragraph to the API
description naming the convention: server responses emit the
requesting user's offset when a user context is present (exports,
doctor-report PDF), background-job-authored payloads emit 'Z',
clients must accept both.
Regenerated docs/api/openapi.yaml via pnpm openapi:generate; check
passes.
This commit is contained in:
1 parent
ce6d6be95a
commit
beb61b78bf
3 files changed
+32
-23
No files matched your search
@@ -35,7 +35,11 @@ export const openApiBase: Pick<
|
||||
title: "HealthLog API",
|
||||
version: "1.4.23",
|
||||
description:
|
||||
"Self-hosted personal-health-tracking PWA — public API surface for the iOS native client and external ingest.",
|
||||
"Self-hosted personal-health-tracking PWA — public API surface for the iOS native client and external ingest.\n\n" +
|
||||
"## Date-time contract\n\n" +
|
||||
"Every field marked `format: date-time` is an ISO-8601 instant. The schema pattern accepts both `Z` (UTC) and `±HH:MM` (offset) suffixes; clients must accept either. " +
|
||||
"Server responses since v1.4.25 emit timestamps with the requesting user's display-timezone offset when a user context exists (exports, doctor-report PDF). Background-job-authored payloads (backups, admin tools) emit `Z`. " +
|
||||
"Native iOS clients should always parse via a Foundation ISO-8601 formatter with the `withInternetDateTime` + `withTimeZone` options enabled.",
|
||||
license: {
|
||||
name: "AGPL-3.0",
|
||||
url: "https://github.com/MBombeck/HealthLog/blob/main/LICENSE",
|
||||
|
||||
Reference in new issue
Block a user