chore(codegen): daily schema refresh (2026-08-21) - #128
Draft
timgl wants to merge 1 commit into
Draft
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema and patch the
resource clients affected by upstream schema drift.
- endpoints resource migrated from /api/environments/{environment_id}/endpoints/ to
/api/projects/{project_id}/endpoints/ (operationIds renamed environments_endpoints_*
-> endpoints_*); added the new operationIds to the filter and repointed the endpoint
client. Stale environments_endpoints_* ids kept in the filter for a human to delete.
- dashboard partial_update body schema renamed PatchedDashboard -> PatchedPatchedDashboardOpenApi.
- experiment schemas renamed PatchedExperiment -> PatchedExperimentWrite and
PaginatedExperimentList -> PaginatedExperimentBasicList.
typecheck + test (291) green.
Generated-By: PostHog Desktop
Task-Id: 302d72fa-1719-4af9-b8ae-0f18a3a3632d
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.
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 byopenapi-filter.yaml) and patched the resource clients affected by upstream schema drift.Why: keep the typed client in sync with the live PostHog API so the IaC tooling stays correct as the API evolves.
Spec diff size
src/generated/api.d.ts: +6,608 / −2,688 lines.New operationIds added to the filter
The endpoints resource moved from
/api/environments/{environment_id}/endpoints/to/api/projects/{project_id}/endpoints/and its operationIds were renamedenvironments_endpoints_*→endpoints_*. Added toopenapi-filter.yaml(existing managed family, same CRUD surface):endpoints_listendpoints_createendpoints_retrieveendpoints_updateendpoints_partial_updateendpoints_destroyResources touched
/api/environments/{environment_id}/endpoints/to/api/projects/{project_id}/endpoints/(path paramenvironment_id→project_id).PatchedDashboard→PatchedPatchedDashboardOpenApi.PatchedExperiment→PatchedExperimentWrite,PaginatedExperimentList→PaginatedExperimentBasicList.Unresolved drift (needs a human)
environments_endpoints_{list,create,retrieve,update,partial_update,destroy}no longer exist in the live spec (renamed toendpoints_*, see above). Per policy they were not deleted — they're kept inopenapi-filter.yamlwith a comment so a human can confirm the migration and remove them.Validation
pnpm typecheck✅pnpm test✅ (291 passed)Pre-existing repo-wide lint/format debt (68 files) was left untouched to keep this diff minimal.
TaskRun:
302d72fa-1719-4af9-b8ae-0f18a3a3632dCreated with PostHog Desktop