Skip to content

feat: add json output exposing the GeneratorMetadata contract - #1134

Open
spydon wants to merge 1 commit into
masterfrom
feat/json-metadata-output
Open

feat: add json output exposing the GeneratorMetadata contract#1134
spydon wants to merge 1 commit into
masterfrom
feat/json-metadata-output

Conversation

@spydon

@spydon spydon commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Reopens #1110 (auto-closed when its base branch merged as #1084 and was deleted), rebased onto master.

Adds a json output to type generation, exposing the raw GeneratorMetadata introspection contract of @supabase/postgrest-typegen for third-party type generators (for example supabase_typegen for Dart):

  • GET /generators/json (with included_schemas/excluded_schemas)
  • PG_META_GENERATE_TYPES=json for the CLI path (npm run gen:types:json)

Changes since the original #1110

The rebase updated the endpoint test for the contract shipped in v0.99.0: the document now carries version (asserted to be 1) and primaryKeys, both introduced by the extracted package's introspect().

Validation

  • npm run check (tsc) and prettier --check pass.
  • Both json endpoint tests pass against the test database, asserting content type, the full key set, introspection fidelity (nullability, defaults, identity), and schema filtering.

@spydon
spydon requested review from a team, avallete and soedirgo as code owners August 31, 2026 17:37
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