Skip to content

chore(codegen): daily schema refresh (2026-05-23)#15

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

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

Conversation

@timgl
Copy link
Copy Markdown
Contributor

@timgl timgl commented May 23, 2026

Summary

Daily refresh of src/generated/api.d.ts against the live PostHog OpenAPI schema.

  • Spec diff size: ~130 lines (+129 / -11) in src/generated/api.d.ts. Entirely additive — new optional fields and enriched descriptions on already-managed schemas. openapi-filter.yaml unchanged.
  • New operationIds added to filter: none. All "missing" operationIds in the live spec are either (a) auxiliary endpoints on managed families (sharing, activity, bulk_update_tags, sub-resources, sub-action mutations like experiments_recalculate_timeseries_create), or (b) belong to unmanaged resource families (logs, surveys, hog_flows, llm_analytics, warehouse, …) that we deliberately don't expose. PUT variants (*_update) on resources where we manage PATCH (*_partial_update) were also skipped — we standardize on PATCH for IaC.
  • Resources touched: none. No Zod schemas or pipeline projections needed adjustment.
  • Unresolved drift: none. All operationIds in openapi-filter.yaml are still present in the live spec.
  • Notable schema additions (visible in the diff and now usable by downstream code):
    • ParserMode enum + parserMode on HogQL query options.
    • resultCustomizations on chart settings, usedLazyPrecompute on query response metadata, cohortLabelStartIndex on RetentionFilter, useWebAnalyticsPrecompute on WebOverviewQuery.
    • query, name/description docs on ExperimentSavedMetric / PatchedExperimentSavedMetric.
    • test_account_filters on Team / PatchedTeam, populated TeamCustomerAnalyticsConfig schema.
    • prompt_name query param on experiments_list.
    • kind discriminator fields on ActionsNode / EventsNode / ExperimentDataWarehouseNode reflowed from @constant to @enum (no semantic change — still a single-value discriminator).

Test plan

  • pnpm install --frozen-lockfile
  • pnpm codegen
  • pnpm typecheck — clean
  • pnpm test — 291 / 291 passing

TaskRun: ba621e2b-24f8-463b-a504-47c4c23b5dba

Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema.

Changes are additive — new optional fields and richer descriptions on existing
schemas (TrendsFilter, Team, ExperimentSavedMetric, RetentionFilter,
WebOverviewQuery, etc.), a new ParserMode enum, and a new prompt_name list
filter on experiments_list. No managed operationIds disappeared from the live
spec and no new managed operationIds were needed.

Generated-By: PostHog Code
Task-Id: ba621e2b-24f8-463b-a504-47c4c23b5dba
@timgl timgl requested a review from pl May 23, 2026 07:52
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