Skip to content

chore(codegen): daily schema refresh (2026-05-29)#21

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

chore(codegen): daily schema refresh (2026-05-29)#21
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-05-29

Conversation

@timgl
Copy link
Copy Markdown
Contributor

@timgl timgl commented May 29, 2026

Summary

Daily refresh of src/generated/api.d.ts from the live PostHog OpenAPI spec.

  • Spec diff size: 1 file changed, 774 insertions, 15 deletions in src/generated/api.d.ts
  • openapi-filter.yaml changes: none
  • Resources touched: none (no Zod / pipeline edits required — additive schema-only changes)
  • Typecheck: passing
  • Tests: 291 / 291 passing

What changed in the spec

All deltas are additive component-schema updates — no breaking removals or renames inside the operations our filter exposes. Highlights:

  • New optional warnings: DataWarehouseSyncWarning[] | null field on most query response schemas (Trends, Funnels, Retention, Lifecycle, Stickiness, HogQL, etc.) flagging stale or failed warehouse-source syncs.
  • New component types: DataWarehouseSyncWarning, CalendarHeatmapFilter, ExperimentMetricOutlierHandling, ParserMode, Response7.
  • AggregationPropertyType1 renamed to AggregationPropertyType (used only in experiments_create_exposure_cohort_for_experiment_create — outside our filter).
  • resultCustomizations added to chart filter schemas; new cohortLabelStartIndex field; new experiment metric math fields (math, math_property, math_group_type_index, math_hogql, ignore_zeros, lower_bound_percentile, upper_bound_percentile, denominator_outlier_handling, numerator_outlier_handling).
  • Discriminator-enum comment style change on kind constants (cosmetic).

New operationIds added to the filter

None. The drift report surfaced ~1,200 operationIds that exist in the live spec but are not in openapi-filter.yaml. None of them close a CRUD gap for an existing managed resource family — they are sub-resources (sharing, collaborators, activity), bulk helpers, or belong to unmanaged resource families.

A few things worth a human's eye for a future PR:

  1. PUT (*_update) operations for resources we currently only manage via PATCH (*_partial_update): cohorts_update, event_definitions_update, experiment_holdouts_update, experiment_saved_metrics_update, experiments_update. PATCH is sufficient for our IaC use case so they are intentionally omitted.
  2. Brand-new resource families that may be worth managing: annotations, surveys, alerts, early_access_feature, notebooks, hog_functions, hog_flows, error_tracking_*, etc. Adding any of these is significant scope (Zod schema + pipeline + diff + execute wiring + tests) and should go through the add-resource skill in a dedicated PR, not a daily refresh.

Unresolved drift

None. No operationIds previously in openapi-filter.yaml have disappeared from the live spec.

TaskRun

Task-Id: 8315a759-53d2-4ba6-98d8-0a8cd3c3ce0d

Regenerated src/generated/api.d.ts from the live PostHog OpenAPI spec. No
changes to openapi-filter.yaml; all changes are additive schema-only
(new optional fields and component types) and pose no breakage for our
managed resource families.

Generated-By: PostHog Code
Task-Id: 8315a759-53d2-4ba6-98d8-0a8cd3c3ce0d
@timgl timgl requested a review from pl May 29, 2026 08:21
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