ci: generate TypeDoc JSON and publish to GitHub Pages#1034
Open
grdsdev wants to merge 8 commits into
Open
Conversation
Adds a workflow that runs swift package dump-symbol-graph on push to main and on a daily schedule, converts the symbol graphs to TypeDoc-compatible JSON using supabase/sdk scripts/swift-docs, and publishes to GitHub Pages at supabase.github.io/supabase-swift/v2/spec.json. The supabase/supabase docs pipeline downloads from that URL to power the Swift v2 reference at supabase.com/docs/reference/swift/v2.
This was referenced Jun 23, 2026
Moves the TypeScript tool that generates TypeDoc JSON from Swift Symbol Graphs into scripts/swift-docs/ so it lives alongside the SDK it serves, rather than requiring a cross-repo checkout at CI time. Updates generate-swift-docs.yml to use the local tool directly; removes the supabase/sdk checkout step and updates working-directory paths accordingly. Also triggers on changes to scripts/swift-docs/**.
grdsdev
added a commit
to supabase/supabase
that referenced
this pull request
Jun 24, 2026
Generated from supabase/supabase-swift#1034 workflow run 28107689217. This file is normally gitignored and downloaded at build time via the Makefile download.swift.v2 target once GitHub Pages is enabled. Force-added here only to unblock e2e pipeline testing.
spydon
approved these changes
Jun 24, 2026
build-reference-content.ts guards on node.variant === 'declaration' before adding a symbol to the functions list (and thus category navigation). Without this field, all 866 Swift symbols were in typeSpec but none were emitted as function slugs, giving 0 categories. Adds variant to the TypeDocDeclaration type and sets it on every declaration object produced by the transform.
…c for named types Parameter declarationFragments include the external argument label before the ": " separator — strip it so the type name is just the Swift type (e.g. UUID, not uid: UUID). Replace reference type fallback with intrinsic for simple identifiers. Using reference caused TypeDoc's id-lookup path to collapse to nameOnly when there was no id to dereference. The docs renderer's ReturnTypeDetails component skips nameOnly types, hiding return type info for all Swift methods.
…gments
paramTypeFragments now handles two additional cases:
1. Array/dict types where Swift bundles the colon and opening bracket as
one fragment (e.g. ": [" → keeps "[" prefix for the type).
2. Computed property accessor blocks ("? { get }", "{ get set }", etc.)
that trail the type — truncate at the first "{" to keep only the type.
Adds a new test suite for paramTypeFragments covering all three forms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/generate-swift-docs.ymlwhich runs on push tomain(whenSources/orPackage.swiftchange) and on a daily scheduleswift package dump-symbol-graphto extract public symbol graphs, then converts them to TypeDoc-compatible JSON via thesupabase/sdkswift-docs toolsupabase.github.io/supabase-swift/v2/spec.jsonThis powers the Swift v2 reference docs at supabase.com — the supabase/supabase pipeline downloads from that URL (see companion PR).
How it works
Categories are mapped from Swift module names automatically:
Test plan
supabase.github.io/supabase-swift/v2/spec.jsonis accessible after mergeSupabaseClient,AuthClientand other public types appear in the JSON with correct categories