chore(codegen): daily schema refresh (2026-06-21)#43
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec (filtered by openapi-filter.yaml). Field-level schema drift only — no managed paths added or removed. Two managed schema components were renamed upstream; update the type references to match the regenerated file: - dashboard PATCH body: PatchedDashboard -> PatchedPatchedDashboardOpenApi - experiments list response: PaginatedExperimentList -> PaginatedExperimentBasicList Generated-By: PostHog Code Task-Id: e9fa9a7e-6e2c-47cd-8dee-02badaa4d369
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-21
Regenerated
src/generated/api.d.tsfrom the live PostHog OpenAPI spec(
https://us.posthog.com/api/schema/?format=json, filtered byopenapi-filter.yaml).Spec diff size
src/generated/api.d.ts: +1958 / −156 lineswarnings,resolved_compare_date_range,resolved_date_range,evaluation_runtime,running_time_calculation,workflows_config,bucketing_identifierfields on insight/experiment/query schemas).New operationIds added to the filter
None. The drift detector's "new operationIds" list is
comm -23 live_ops filter_ops— i.e. the entire unmanaged API surface, not newly-appeared operations.openapi-filter.yamlis a deliberate allowlist of ~70 operations across 13 resource families; every entry in the drift list is an intentionally-unmanaged product/admin/internal endpoint (accounts, agents, conversations, error tracking, llm analytics, logs, vision, tasks, warehouse, …) that doesn't belong in this IaC client.No operationId in the list represents a gap in an existing managed CRUD family. The full-PUT
*_updateverbs that share a path with managed families (cohorts_update,experiments_update,event_definitions_update,experiment_holdouts_update,experiment_saved_metrics_update,schema_property_groups_update,event_schemas_update) are long-standing, intentionally-excluded operations — the maintainers manage onlypartial_updatefor these families. They are not new drift, so they were left out to keep the change minimal and preserve that choice. A human can opt them in later if desired.Resources touched
Two upstream schema-component renames broke type references in managed clients; updated to match the regenerated file (no behavioral change):
dashboard/client.tsPatchedDashboardPatchedPatchedDashboardOpenApiexperiment/client.tsPaginatedExperimentListPaginatedExperimentBasicListThe experiments list endpoint now returns
ExperimentBasicitems. VerifiedExperimentBasicstill carriesid,name, andfeature_flag_key, soServerExperimentSchema.parseon list rows remains safe — no Zod schema patch required.Unresolved drift
Verification
pnpm typecheck✅pnpm test✅ (291/291)🤖 Generated by the daily schema-refresh agent.
TaskRun: https://us.posthog.com/project/423401/tasks/e9fa9a7e-6e2c-47cd-8dee-02badaa4d369