fix(api): regen for typed TimingPhasesDto in HTTP check details#12
Merged
Conversation
Picks up the upstream mono fix (devhelmhq/mono#271) that replaces the misleading `Map<String, Object>` `Http.timing` schema with a typed `TimingPhasesDto`. Before regen, the Go type was the nonsensical Timing *map[string]*map[string]interface{} which couldn't actually decode the wire payload (a flat snake_case object of nullable ints). After regen, `Timing` is a typed `*TimingPhasesDto` with `*int32` fields for `dns_ms`, `tcp_ms`, `tls_ms`, `ttfb_ms`, `download_ms`, `total_ms`. The provider doesn't currently expose check-result timing as a Terraform resource/data-source attribute, so no resource/datasource code changes are required — this is a pure type-shape correction that ships as part of the next release. Verified: `go build`, `go test ./...`, and `golangci-lint run ./...` all pass clean. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/generated/types.goand the vendoreddocs/openapi/monitoring-api.jsonfrom the upstream spec to pick up devhelmhq/mono#271.Map<String, Object>schema forHttp.timingwith a typedTimingPhasesDto(nullable ints:dns_ms,tcp_ms,tls_ms,ttfb_ms,download_ms,total_ms).Why
Before this regen the Go type was:
…which couldn't actually decode the real wire payload (a flat snake_case object of nullable ints). After regen it's the much more useful:
with
TimingPhasesDtoexposing typed*int32fields for each phase. The provider doesn't currently surface check-result timing as a Terraform resource/data-source attribute, so this is a pure type-shape correction that ships in the next release — no provider code edits required.Diff scope
Pure regen via
scripts/regen-from.sh— no hand edits:docs/openapi/monitoring-api.json— spec drop-ininternal/generated/types.go—Http.Timingretyped + newTimingPhasesDtomodelTest plan
make buildcleanmake test— all unit tests passmake lint(golangci-lint run ./...) — 0 issuesMade with Cursor