Skip to content

chore(codegen): daily schema refresh (2026-06-17)#39

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

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

Conversation

@timgl

@timgl timgl commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Daily OpenAPI schema refresh — 2026-06-17

Automated regeneration of src/generated/api.d.ts from the live PostHog
OpenAPI schema (https://us.posthog.com/api/schema/?format=json, filtered by
openapi-filter.yaml).

Spec diff size

  • src/generated/api.d.ts: +1772 / −129 lines (17,571 → 19,214)
  • Component schemas: +22 / −1 (321 → 342)
  • Operations (paths): unchanged at 31 — all 71 allowlisted operationIds still resolve in the live spec
  • Live spec surface: 2,234 operations total; filter allowlist: 71

New operationIds added to the filter

None. openapi-filter.yaml is unchanged. The drift detector's "new
operationIds" list is essentially the entire 2,234-operation API surface — the
filter is a deliberately curated allowlist, and everything outside it is
intentionally unmanaged (internal/admin/aux endpoints, plus auxiliary actions
like *_activity, *_sharing, *_bulk_update_tags on already-managed
families). No newly-appeared operation belongs to a managed family's core
CRUD
, so nothing was added.

For the record, the live spec does expose full-PUT _update variants for
several managed families (experiments_update, cohorts_update,
event_definitions_update, schema_property_groups_update,
event_schemas_update / _partial_update, experiment_holdouts_update,
experiment_saved_metrics_update). These are intentionally excluded — the
resource clients are built around PATCH (partial_update); adding the PUT
variants would expand surface area with no consumer. Left for a human if PUT
support is ever wanted.

Resources touched

  • dashboard (src/resources/dashboard/client.ts): upstream renamed the
    patch request schema PatchedDashboardPatchedPatchedDashboardOpenApi.
    Updated the PatchedDashboardBody type alias to track it. The new schema
    retains the restriction_level and tiles fields the client uses — no
    behavior change. This was the only drift that broke typecheck.

No Zod schema or pipeline.ts projection changes were required.

New component schemas pulled in (additive, via existing managed types)

PatchedPatchedDashboardOpenApi, DashboardPatchTileOpenApi,
DashboardPatchWidgetOpenApi, MinimalFeatureFlag,
FeatureFlagExperimentSetMetadata, ExperimentExposureEstimateConfig,
ExperimentMetricOutlierHandling, ExperimentRunningTimeCalculation,
DataWarehouseSyncWarning, CalendarHeatmapFilter, and assorted widget/team
config schemas (*WidgetConfig, Widget*, Team*Config, Accounts*).

Verification

  • pnpm typecheck
  • pnpm test ✅ (291 tests, 35 files)

Pre-existing pnpm lint (5 errors) and pnpm format:check (68 files) debt is
repo-wide on main and unrelated to this change — not touched, to avoid
editing unrelated files.

Unresolved drift

None. No allowlisted operationId disappeared from the live spec, so there is
nothing to flag for human deletion.


🤖 Daily schema refresh agent · Task-Id d6db24be-37ad-4bcc-8a10-9aa95f560f9d

Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema
(filtered by openapi-filter.yaml). Schema-only drift across the 71 managed
operations: +22 component schemas, -1 (PatchedDashboard renamed upstream to
PatchedPatchedDashboardOpenApi). Updated the dashboard client's
PatchedDashboardBody alias to track the rename; no behavior change.

openapi-filter.yaml unchanged — all 71 allowlisted operationIds still resolve
in the live spec, and no new operations belong to a managed family's core CRUD.

Generated-By: PostHog Code
Task-Id: d6db24be-37ad-4bcc-8a10-9aa95f560f9d
@timgl timgl requested a review from pl June 17, 2026 08:49
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