chore(codegen): daily schema refresh (2026-07-31) - #108
Draft
timgl wants to merge 1 commit into
Draft
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec.
Substantive drift: the Endpoints API moved from
/api/environments/{environment_id}/endpoints/ (operationIds
environments_endpoints_*) to /api/projects/{project_id}/endpoints/
(operationIds endpoints_*). Updated openapi-filter.yaml and the endpoint
resource client to match.
Also refreshed schema type aliases whose generated names changed:
- dashboard: PatchedDashboard -> PatchedPatchedDashboardOpenApi
- experiment: Experiment/PatchedExperiment/PaginatedExperimentList ->
ExperimentWrite/PatchedExperimentWrite/PaginatedExperimentBasicList
typecheck + all 291 tests pass.
Generated-By: PostHog Code
Task-Id: e20fb297-ead3-4ac1-8ca0-532f571fe554
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.
Why
Automated daily refresh of the typed OpenAPI client. Today's run picked up a
breaking rename in the Endpoints API that would otherwise silently break the
endpointresource, so it needs a human to land the client changes.Spec diff size
src/generated/api.d.ts: +3,952 / −1,623 lines (17,571 → 19,900 lines).Most of the churn is field-level schema updates across the managed resource
types; the substantive structural change is the Endpoints move described below.
New operationIds added to the filter
None added as net-new. The one filter change is a rename of the Endpoints
CRUD operations, which moved in the live spec:
environments_endpoints_listendpoints_listenvironments_endpoints_createendpoints_createenvironments_endpoints_retrieveendpoints_retrieveenvironments_endpoints_updateendpoints_updateenvironments_endpoints_partial_updateendpoints_partial_updateenvironments_endpoints_destroyendpoints_destroyThe route also moved from
/api/environments/{environment_id}/endpoints/to/api/projects/{project_id}/endpoints/.The daily drift report flagged a large number of other operationIds present in
the live spec but absent from
openapi-filter.yaml. These were intentionallyleft out — they are auxiliary/non-CRUD operations on already-managed families
(activity logs, sharing, bulk-tag updates, metadata, etc.) or belong to products
outside this repo's infrastructure-as-code surface. The filter is a deliberate
allowlist of the CRUD operations the resource clients actually use; adding the
rest would bloat the generated types without serving any resource.
Resources touched
openapi-filter.yaml— Endpoints operationId rename.src/resources/endpoint/client.ts— path + path-param update(
environments/{environment_id}→projects/{project_id}).src/resources/dashboard/client.ts— schema alias renamePatchedDashboard→PatchedPatchedDashboardOpenApi.src/resources/experiment/client.ts— schema alias renamesExperiment/PatchedExperiment/PaginatedExperimentList→ExperimentWrite/PatchedExperimentWrite/PaginatedExperimentBasicList.pnpm typecheckpasses and all 291 tests pass.Unresolved drift / needs a human
environments_endpoints_*operationIds disappeared from the live spec; theywere treated as a rename to
endpoints_*rather than a deletion. Pleaseconfirm this is the intended API migration and not a transient spec change.
is flagged for human deletion.
TaskRun
Triggered by the daily schema-refresh cloud run —
TaskRun
e20fb297.Created with PostHog Code