chore(codegen): daily schema refresh (2026-06-07)#29
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema (https://us.posthog.com/api/schema/?format=json), filtered by openapi-filter.yaml. Additive field/component drift on already-managed operations only; no filter changes and no Zod schema patches required (typecheck + schema tests pass). Generated-By: PostHog Code Task-Id: b6c211a9-cd6d-47b1-9576-70d5773a87cf
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
Automated regeneration of
src/generated/api.d.tsfrom the live PostHog OpenAPIspec (
https://us.posthog.com/api/schema/?format=json), trimmed to theoperations allowlisted in
openapi-filter.yaml.Spec diff size
src/generated/api.d.ts: +1384 / −49 lines (only file changed)openapi-filter.yaml: unchangedThe drift is additive field/component changes on operations we already manage —
no breaking removals. New component schemas pulled in by managed operations:
ExperimentParametersgainedExperimentMetricOutlierHandling(numerator/denominator outlier handling) and related exposure fields
→ managed via
experiments_*TeamCustomerAnalyticsConfig,TeamWorkflowsConfig+capture_workflows_engagement_events→ managed viaenvironments_retrieve/environments_partial_update(project settings)CalendarHeatmapFilter,AccountsQuery/AccountsQueryResponse,DataWarehouseSyncWarning→ referenced by insight/query schemasNew operationIds added to the filter
None. Every operationId in the live spec that is absent from
openapi-filter.yamlwas reviewed; none warranted adding:_updatevariants of resources we manage via PATCH —cohorts_update,experiments_update,experiment_holdouts_update,experiment_saved_metrics_update,event_definitions_update,event_schemas_update/event_schemas_partial_update,schema_property_groups_update. The clients update exclusively viaapi.PATCH(*_partial_update), so the PUT variants would be unused deadweight. Excluding them is consistent with the existing curation.
environments_list/_create/_update/_destroy. Project settings is managed as a singleton viaenvironments_retrieve+environments_partial_update; IaC does notcreate/delete environments, so these stay out of scope.
(sharing, activity, collaborators, bulk-tagging, suggestions, …),
environment-scoped duplicates of project-scoped resources, or brand-new
resource families that
docs/resources.mdalready marks asnot-yet-supported (surveys, notebooks, error_tracking, warehouse, llm_*,
conversations, vision, etc.). None are core CRUD for a currently-managed
family.
Resources touched
None beyond the regenerated types — no
client.tsZod schemas orpipeline.tsprojections needed patching.
pnpm typecheckpasses; all 290 schema/pipelinetests pass.
Removed operationIds (flagged, not deleted)
None — every operationId currently in
openapi-filter.yamlis still present inthe live spec.
Unresolved drift / notes
src/pull/run.test.ts > runPull orchestrator > writes files and calls tagOnServer on a non-dry run, intermittently exceedsits 500ms
testTimeoutunder full-suite parallel load (~504–554ms). Verifiedit fails identically on the base
mainapi.d.ts, so it is unrelated tothis refresh and left untouched. It passes in isolation. Worth a small
timeout bump in a separate change.
TaskRun:
b6c211a9-cd6d-47b1-9576-70d5773a87cf🤖 Generated with Claude Code