chore(codegen): daily schema refresh (2026-07-14)#67
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema and patch two managed-resource Zod client bindings for renamed component schemas. Schema renames absorbed: - PatchedDashboard -> PatchedPatchedDashboardOpenApi (dashboards partial_update body) - PatchedExperiment -> PatchedExperimentWrite (experiments partial_update body) - PaginatedExperimentList -> PaginatedExperimentBasicList (experiments list response) No changes to openapi-filter.yaml: no new operationId entered a managed resource family and no managed operationId was removed from the live spec. Generated-By: PostHog Code Task-Id: d558a6f9-6481-4885-be56-1beaaadc2e62
|
🤖 Automated CI triage — schema-refresh agent The only failing check is semgrep (2 blocking
These are not introduced by this PR. This PR only touches I'm not fixing it in this turn: it's outside this schema-refresh PR's scope and lives in The PR's own changes are green locally: |
Summary
Daily automated OpenAPI schema refresh. Regenerated
src/generated/api.d.tsfrom the live PostHog spec (
https://us.posthog.com/api/schema/?format=json,filtered by
openapi-filter.yaml) and patched two managed-resource clientbindings for renamed generated component schemas.
Why: keep the typed client in sync with the live API so downstream
consumers compile against accurate request/response shapes.
Spec diff size
src/generated/api.d.ts: +2802 / −290 lines (17,571 → 20,083).API paths entered the managed set.
New operationIds added to the filter
None. The drift trigger lists every operationId not in the allowlist (~1500),
but that is the standing set of intentionally-unmanaged endpoints — this tool is
an infrastructure-as-code layer over a curated set of resource families
(insights, dashboards, feature flags, experiments + holdouts/saved-metrics,
cohorts, actions, endpoints, event definitions, event schemas, schema property
groups, project settings). None of the unmanaged operationIds are a missing core
CRUD operation for an existing managed family, and none constitute a new resource
family worth managing here. So
openapi-filter.yamlis unchanged.Resources touched
Codegen surfaced three renamed component schemas on managed operations, fixed
minimally in the Zod client bindings (no refactor):
dashboard(partial_update body)PatchedDashboardPatchedPatchedDashboardOpenApiexperiment(partial_update body)PatchedExperimentPatchedExperimentWriteexperiment(list response)PaginatedExperimentListPaginatedExperimentBasicListVerified
PatchedPatchedDashboardOpenApistill carries therestriction_leveland
tilesfields the dashboard pipeline projects.pnpm typecheckandpnpm test(291 tests) both pass after the patch.Unresolved drift
operations still resolve.
Experiment→ExperimentWriteupstream. The client casts the payload via
as unknown as, so it stilltypechecks against the (still-present)
Experimentread schema and runtime isunaffected; left as-is to keep the diff minimal. Flagging for a human if a
tighter binding is desired.
TaskRun
d558a6f9-6481-4885-be56-1beaaadc2e62Created with PostHog Code