Skip to content

Schema updates#104

Closed
kdhillon-stripe wants to merge 5 commits intomainfrom
worker-001
Closed

Schema updates#104
kdhillon-stripe wants to merge 5 commits intomainfrom
worker-001

Conversation

@kdhillon-stripe
Copy link
Collaborator

No description provided.

kdhillon-stripe and others added 5 commits February 9, 2026 20:21
Add comprehensive type mapping functionality to convert OpenAPI/JSON Schema
types to Postgres types with indexing optimization. This implements Task 002
from the dynamic schema generation project.

Key features:
- Maps all OpenAPI types to appropriate Postgres types (text, bigint, jsonb, etc.)
- Handles special Stripe field conventions (id, object, metadata, timestamps)
- Distinguishes between simple arrays (text[]) and complex arrays (jsonb)
- Provides indexing recommendations for each column type
- Supports table naming conventions with pluralization
- Comprehensive unit and integration tests

The type mapper works with the existing OpenAPI parser to enable dynamic
table generation from any Stripe API version specification. All generated
columns are designed to be indexable by users for optimal query performance.

Committed-By-Agent: claude
Add 17 unit tests covering all TableGenerator functionality:
- CREATE TABLE generation with various column types
- Schema evolution with ALTER TABLE ADD COLUMN
- Table naming conventions and pluralization
- Indexing recommendations for common fields
- Error handling for invalid objects
- Custom schema name support

All tests passing. Completes Task 003 requirements.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Committed-By-Agent: claude
Add a new /schema page to the dashboard that visualizes PostgreSQL table
schemas generated from Stripe's OpenAPI specification using React Flow.

Features:
- Interactive canvas with pan/zoom and drag-and-drop table positioning
- Automatic dagre-based layout for clean table arrangement
- FK relationship detection and visualization with labeled edges
- PK (orange) and FK (purple) badges on columns
- API version selector dropdown (currently supports "current" version)
- MiniMap for navigation on large schemas

The visualizer fetches Stripe's OpenAPI spec, parses it to extract common
object types (customer, subscription, invoice, etc.), and renders them as
draggable table cards showing column names, types, and nullability.

Committed-By-Agent: claude
@kdhillon-stripe kdhillon-stripe changed the title temp Schema updates Feb 12, 2026
@kdhillon-stripe kdhillon-stripe marked this pull request as ready for review February 12, 2026 16:05
Copy link
Collaborator

@Yostra Yostra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try the OpenAPITools schema generator? It would be nice if it worked (reduce the maintenance surface area).

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.

2 participants

Comments