chore(codegen): daily schema refresh (2026-06-22)#44
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec. Upstream renamed two component schemas referenced by the typed client: - PatchedDashboard -> PatchedPatchedDashboardOpenApi (dashboard PATCH body) - PaginatedExperimentList -> PaginatedExperimentBasicList (experiments list response) Updated the two type aliases in dashboard/client.ts and experiment/client.ts to match. No managed operationIds were added or removed; the rest of the drift is field-level schema evolution within already-managed operations. typecheck + test (291 passing) + build all green. Generated-By: PostHog Code Task-Id: 11e47902-f9f6-42af-9307-706f6e54f960
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.
Daily OpenAPI schema refresh — 2026-06-22
Automated regeneration of
src/generated/api.d.tsfrom the live PostHog OpenAPIspec (
https://us.posthog.com/api/schema/?format=json, filtered byopenapi-filter.yaml).Spec diff size
src/generated/api.d.ts: +1958 / −156 lines (mostly field-level additions toquery-node and result schemas already reachable from managed operations — e.g.
preComputeStrategy,useWebAnalyticsPrecompute, widget/insight query fields).New operationIds added to the filter
None. The set of managed operations is unchanged. Every operationId reported
as "missing from the filter" by the drift detector falls into one of two buckets,
neither of which warrants managing in this IaC tool:
llm_analytics, surveys, batch_exports, warehouse, tasks, web_analytics, etc.).
CRUD (e.g.
insights_activity_retrieve,dashboards_collaborators_*,feature_flags_status_retrieve,*_sharing_*,*_bulk_update_tags_create).Full-PUT
*_updateverbs that exist upstream for some managed families(
cohorts_update,event_definitions_update,experiments_update,experiment_holdouts_update,experiment_saved_metrics_update) weredeliberately left out — the apply pipeline updates these resources via
partial_update(PATCH), matching the existing curated allowlist. Adding the PUTvariants would pull extra schema with no behavioural benefit.
Resources touched
Two upstream component-schema renames broke
pnpm typecheck; both werefield-compatible, so the fix was a one-line type-alias update each (no behaviour
change):
src/resources/dashboard/client.tsPatchedDashboardPatchedPatchedDashboardOpenApisrc/resources/experiment/client.tsPaginatedExperimentListPaginatedExperimentBasicListUnresolved drift
None. No managed operationId disappeared from the live spec (all 71 still
present — nothing flagged for human deletion). No Zod schema or
pipeline.tsprojection patches were required beyond the two renames above.
Verification
pnpm typecheck✅pnpm test✅ (291 passed)pnpm build✅TaskRun
https://us.posthog.com/project/423401/tasks/11e47902-f9f6-42af-9307-706f6e54f960