Skip to content

chore(codegen): daily schema refresh (2026-06-12) - #34

Open
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-06-12
Open

chore(codegen): daily schema refresh (2026-06-12)#34
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-06-12

Conversation

@timgl

@timgl timgl commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Daily OpenAPI schema refresh — 2026-06-12

Automated regeneration of src/generated/api.d.ts from the live PostHog OpenAPI
spec (https://us.posthog.com/api/schema/?format=json, filtered by
openapi-filter.yaml). Generated via pnpm codegenapi.d.ts was not
hand-edited.

Spec diff size

File Change
src/generated/api.d.ts +1634 / −115 lines
openapi-filter.yaml unchanged

This cycle is pure schema drift on operations we already manage — no paths
were added or removed from the managed surface. Most of the delta is newly
expanded nested component schemas pulled in by existing operations (e.g.
DashboardPatchTileOpenApi, WidgetDateRange, ErrorTrackingListWidgetConfig,
SessionReplayListWidgetConfig, MinimalFeatureFlag,
ExperimentMetricOutlierHandling, TeamWorkflowsConfig).

New operationIds added to the filter

None. The drift report's "new operationIds" list is the static complement of
our curated allowlist (~71 ops out of ~2095 live ops) — it is not a set of
endpoints that newly appeared this cycle. Everything on it is intentionally
unmanaged: sub-resource actions (*_activity, *_sharing, *_logs), internal/
admin/debug surfaces (wizard_*, *_kernel_*, sandbox_*, signals_scout_*,
tasks_runs_*), and PUT (*_update) duplicates of PATCH verbs we already track
and that no client consumes. An automated schema refresh deliberately does not
expand the managed resource families; that's a human curation decision.

Resources touched

  • dashboard (src/resources/dashboard/client.ts): the live spec renamed the
    dashboards_partial_update request-body component
    PatchedDashboardPatchedPatchedDashboardOpenApi. Updated the
    PatchedDashboardBody type alias to match. No behavior change; minimal edit.

Unresolved drift

None. pnpm typecheck passes. pnpm test passes (291 tests) — one test,
src/pull/run.test.ts > writes files and calls tagOnServer on a non-dry run,
flaked on a 500 ms timeout under full-suite parallel load and passes
deterministically in isolation; it does not touch the dashboard schema and is
unrelated to this refresh.

Operations removed from the live spec

None. All managed operationIds in openapi-filter.yaml are still present in
the live spec.


TaskRun: e4980cc3-e437-4d44-888f-d164247f4034

🤖 Generated with Claude Code

Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec via
`pnpm codegen`. The filter (openapi-filter.yaml) is unchanged — this cycle is
pure schema drift on already-managed operations (+1634/-115 lines).

The live spec renamed the dashboards_partial_update request body component
`PatchedDashboard` → `PatchedPatchedDashboardOpenApi`. Update the type alias in
src/resources/dashboard/client.ts to match; no behavior change.

typecheck and test pass.

Generated-By: PostHog Code
Task-Id: e4980cc3-e437-4d44-888f-d164247f4034
@timgl
timgl requested a review from pl June 12, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant