Skip to content

fix(api): regen for typed TimingPhasesDto in HTTP check details#18

Merged
caballeto merged 1 commit into
mainfrom
fix/http-timing-typed-dto
Apr 23, 2026
Merged

fix(api): regen for typed TimingPhasesDto in HTTP check details#18
caballeto merged 1 commit into
mainfrom
fix/http-timing-typed-dto

Conversation

@caballeto
Copy link
Copy Markdown
Member

Summary

  • Regenerates src/lib/api{,-zod}.generated.ts and docs/openapi/monitoring-api.json from the upstream spec to pick up devhelmhq/mono#271.
  • That PR replaces Http.timing's erroneous Map<String, Object> schema with a typed TimingPhasesDto (nullable ints for dns_ms, tcp_ms, tls_ms, ttfb_ms, download_ms, total_ms).
  • Without this regen, any CLI command that decoded details.checkDetails.timing against the strict zod schema would have been rejected — the schema expected an object map of objects, but the wire format is a flat snake_case object of integers.

Diff scope

Pure regen — no hand edits:

  • docs/openapi/monitoring-api.json — spec drop-in
  • src/lib/api.generated.tsHttp.timing now references TimingPhasesDto; new TimingPhasesDto typed schema added
  • src/lib/api-zod.generated.ts — matching zod schema added + wired in

Test plan

  • make check (lint + typecheck + 870 vitest tests) passes locally
  • Verified diff is limited to the timing schema swap + new TimingPhasesDto model

Made with Cursor

Picks up the upstream mono fix (devhelmhq/mono#271) that replaces
the misleading `Map<String, Object>` timing field on `Http`
check details with a typed `TimingPhasesDto`.

Before this regen the generated zod schema had:
    timing: z.record(z.object({}).partial().strict().nullable()).nullish()
which would reject the actual snake_case integer payload (`dns_ms`,
`tcp_ms`, …) coming from the API. After regen `timing` correctly
references `TimingPhasesDto` with nullable int fields.

Diff is fully mechanical (typegen + zodgen + descgen). All 870 unit
tests pass.

Made-with: Cursor
@caballeto caballeto merged commit 9337694 into main Apr 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant