chore(codegen): daily schema refresh (2026-08-29) - #136
Draft
timgl wants to merge 1 commit into
Draft
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec and follow
resource drift.
- Endpoints resource moved from /api/environments/{environment_id}/endpoints/ to
/api/projects/{project_id}/endpoints/ (operationIds environments_endpoints_* ->
endpoints_*). Migrated openapi-filter.yaml and endpoint client paths/params.
- PatchedDashboard -> PatchedPatchedDashboardOpenApi (dashboard PATCH body).
- PatchedExperiment -> PatchedExperimentWrite; PaginatedExperimentList ->
PaginatedExperimentBasicList (experiment client).
typecheck + all 291 unit tests pass.
Generated-By: PostHog Desktop
Task-Id: 8e5009a3-8660-4f4c-8d16-12e4c321b746
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 OpenAPI schema refresh. Regenerates the typed client
(
src/generated/api.d.ts) from the live PostHog spec and reconciles resourcedrift so the SDK keeps compiling against the current API.
Spec diff size
src/generated/api.d.ts: 17,571 → 21,716 lines (+6,198 / −2,053). The bulkis upstream schema growth (new fields) on already-managed operations.
openapi-filter.yaml: 6 operationIds migrated (see below).New operationIds added to the filter
endpoints_list,endpoints_create,endpoints_retrieve,endpoints_update,endpoints_partial_update,endpoints_destroyThese are not a new family — they are the renamed successors of the endpoints
resource (see drift below).
Resources touched
/api/environments/{environment_id}/endpoints/→/api/projects/{project_id}/endpoints/and path paramenvironment_id→project_idinclient.ts.PatchedDashboard→PatchedPatchedDashboardOpenApi.PatchedExperiment→PatchedExperimentWrite;list response
PaginatedExperimentList→PaginatedExperimentBasicList.src/generated/api.d.tsregenerated (not hand-edited).Drift resolved
moved off the environments router onto the projects router; operationIds
environments_endpoints_*disappeared and reappeared asendpoints_*at/api/projects/{project_id}/endpoints/. Treated as a rename (no coverage lost):filter and client migrated 1:1. No other managed operationId disappeared.
list envelope, patched in the affected client Zod/type projections above.
Unresolved drift / intentionally left out
families (accounts, alerts, annotations, batch_exports, warehouse, tasks, etc.).
These are internal/admin/product surfaces, not part of the IaC resource model,
so they are intentionally not added to the filter. Adopting any as a new
managed resource family is a product decision left for a human.
Verification
pnpm typecheck✓pnpm test✓ (35 files, 291 tests)Pre-existing repo-wide lint/format nonconformance (unrelated files) was left
untouched to keep this diff scoped.
Created with PostHog Desktop