Skip to content

Generate Schema from OpenAPI spec and support multiple API versions#114

Merged
Yostra merged 13 commits intomainfrom
schema-change
Mar 6, 2026
Merged

Generate Schema from OpenAPI spec and support multiple API versions#114
Yostra merged 13 commits intomainfrom
schema-change

Conversation

@kdhillon-stripe
Copy link
Collaborator

@kdhillon-stripe kdhillon-stripe commented Feb 18, 2026

  • Introduce OpenAPI-driven schema generation for Stripe data.
  • Add a parser pipeline (specParser) that reads Stripe OpenAPI schemas and infers runtime table/column definitions.
  • Add SQL generation (postgresAdapter) and wire it into migration flow so schema can be created/updated from spec.
  • Ties schema generation to sync runtime config (resourceRegistry) so we only generate tables we actually use (See Future Work below to improve this).
  • Keeping compatibility columns + internal sync metadata handling to make rollout safe with existing runtime expectations.

Future work:

  • Support for v2 objects (thin events).
    • Pagination for v2 objects are also different
  • Support for customizing postgres schema name

Committed-By-Agent: cursor

# Conflicts:
#	packages/sync-engine/src/database/migrate.ts
#	packages/sync-engine/src/stripeSync.ts
#	packages/sync-engine/src/supabase/edge-functions/stripe-setup.ts
@tx-stripe tx-stripe changed the title Schema change Generate Schema from OpenAPI spec and support multiple API versions Feb 27, 2026
@tx-stripe tx-stripe added this to the oss ga milestone Feb 27, 2026
…chema-change

Committed-By-Agent: cursor

# Conflicts:
#	packages/fastify-app/src/test/checkoutSessions.test.ts
#	packages/sync-engine/src/database/migrate.ts
#	packages/sync-engine/src/stripeSync.ts
#	packages/sync-engine/src/tests/integration/postgres-sync-observability.test.ts
#	packages/sync-engine/src/types.ts
@kdhillon-stripe kdhillon-stripe marked this pull request as ready for review March 4, 2026 19:15
@cla-assistant
Copy link

cla-assistant bot commented Mar 6, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link

cla-assistant bot commented Mar 6, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Yostra Yostra merged commit ff16aee into main Mar 6, 2026
5 of 6 checks passed
@Yostra Yostra deleted the schema-change branch March 6, 2026 16:40
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.

3 participants