chore(codegen): daily schema refresh (2026-06-17)#39
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema (filtered by openapi-filter.yaml). Schema-only drift across the 71 managed operations: +22 component schemas, -1 (PatchedDashboard renamed upstream to PatchedPatchedDashboardOpenApi). Updated the dashboard client's PatchedDashboardBody alias to track the rename; no behavior change. openapi-filter.yaml unchanged — all 71 allowlisted operationIds still resolve in the live spec, and no new operations belong to a managed family's core CRUD. Generated-By: PostHog Code Task-Id: d6db24be-37ad-4bcc-8a10-9aa95f560f9d
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-17
Automated regeneration of
src/generated/api.d.tsfrom the live PostHogOpenAPI schema (
https://us.posthog.com/api/schema/?format=json, filtered byopenapi-filter.yaml).Spec diff size
src/generated/api.d.ts: +1772 / −129 lines (17,571 → 19,214)New operationIds added to the filter
None.
openapi-filter.yamlis unchanged. The drift detector's "newoperationIds" list is essentially the entire 2,234-operation API surface — the
filter is a deliberately curated allowlist, and everything outside it is
intentionally unmanaged (internal/admin/aux endpoints, plus auxiliary actions
like
*_activity,*_sharing,*_bulk_update_tagson already-managedfamilies). No newly-appeared operation belongs to a managed family's core
CRUD, so nothing was added.
For the record, the live spec does expose full-
PUT_updatevariants forseveral managed families (
experiments_update,cohorts_update,event_definitions_update,schema_property_groups_update,event_schemas_update/_partial_update,experiment_holdouts_update,experiment_saved_metrics_update). These are intentionally excluded — theresource clients are built around
PATCH(partial_update); adding the PUTvariants would expand surface area with no consumer. Left for a human if PUT
support is ever wanted.
Resources touched
src/resources/dashboard/client.ts): upstream renamed thepatch request schema
PatchedDashboard→PatchedPatchedDashboardOpenApi.Updated the
PatchedDashboardBodytype alias to track it. The new schemaretains the
restriction_levelandtilesfields the client uses — nobehavior change. This was the only drift that broke typecheck.
No Zod schema or
pipeline.tsprojection changes were required.New component schemas pulled in (additive, via existing managed types)
PatchedPatchedDashboardOpenApi,DashboardPatchTileOpenApi,DashboardPatchWidgetOpenApi,MinimalFeatureFlag,FeatureFlagExperimentSetMetadata,ExperimentExposureEstimateConfig,ExperimentMetricOutlierHandling,ExperimentRunningTimeCalculation,DataWarehouseSyncWarning,CalendarHeatmapFilter, and assorted widget/teamconfig schemas (
*WidgetConfig,Widget*,Team*Config,Accounts*).Verification
pnpm typecheck✅pnpm test✅ (291 tests, 35 files)Unresolved drift
None. No allowlisted operationId disappeared from the live spec, so there is
nothing to flag for human deletion.
🤖 Daily schema refresh agent · Task-Id
d6db24be-37ad-4bcc-8a10-9aa95f560f9d