chore(codegen): daily schema refresh (2026-07-19)#71
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema. Upstream renamed three component schemas referenced by managed resources; patched the type aliases (schema keys only, no logic change): - dashboard: PatchedDashboard -> PatchedPatchedDashboardOpenApi - experiment: PatchedExperiment -> PatchedExperimentWrite - experiment: PaginatedExperimentList -> PaginatedExperimentBasicList openapi-filter.yaml unchanged. typecheck + test pass. Generated-By: PostHog Code Task-Id: 71a58796-b034-4284-9ded-496eac942ae1
|
🤖 Automated schema-refresh agent: CI triage note. The failing This PR only touches |
Why
Automated daily refresh of the generated OpenAPI types so the typed client stays in sync with the live PostHog API. This run picked up upstream schema drift on already-managed resources.
Spec diff
src/generated/api.d.ts: +3041 / −403 (1 file). Pure regeneration viapnpm codegen— not hand-edited.The change is upstream schema drift on the operations already in
openapi-filter.yaml(new/changed fields and some renamed component schemas), not new routes.New operationIds added to the filter
None.
openapi-filter.yamlis unchanged.The filter uses an allowlist (
inverseOperationIds), so the large "new operationIds" list in the drift report is almost entirely endpoints we intentionally don't manage. Every genuinely-new op that shares a prefix with a managed family is a non-core sub-action (activity / sharing / bulk-tags / tile ops / materialization / recalculation / stats) or aPUT _updatevariant for a resource whose client deliberately standardizes onPATCH _partial_update. None represent a missing core CRUD operation, so nothing was added and no new resource family was introduced.No brand-new families were auto-added: the newly-appeared families (accounts, agent applications, error tracking, logs, warehouse, tracing, etc.) are product/admin surfaces outside this library's IaC definition scope — that's a maintainer decision, not something to wire up unattended in a codegen refresh.
Resources touched
Renamed component schemas upstream required patching type aliases (schema key only — no logic/behavior change):
src/resources/dashboard/client.ts—PatchedDashboard→PatchedPatchedDashboardOpenApisrc/resources/experiment/client.ts—PatchedExperiment→PatchedExperimentWrite,PaginatedExperimentList→PaginatedExperimentBasicListpnpm typecheckandpnpm test(291 tests) both pass.Unresolved drift
openapi-filter.yamlstill exists in the live spec.event_schemas_partial_update(theevent_schemasfamily currently has no update path in the filter), plusPUT _updatevariants now available forcohorts,event_definitions,schema_property_groups,experiment_holdouts, andexperiment_saved_metrics. Left out because each resource already updates viaPATCHand addingPUTneeds client wiring for no functional gain.mainin files this PR does not touch; left untouched to avoid unrelated changes.TaskRun
https://us.posthog.com/project/423401/tasks/71a58796-b034-4284-9ded-496eac942ae1
Created with PostHog Code