fix(api-docs): document const/InjectionToken exports (Variable kind)#683
Merged
Conversation
Add ReflectionKind.Variable handling to reflectionToEntry so export const declarations (InjectionTokens, config objects, icon constants, fixture helpers) are included in generated api-docs.json files. The ApiDocEntry kind union gains 'const' in both the generator and the website renderer; no exhaustive switch touched. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
The api-docs generator (
generate-api-docs.ts) only handled Function/Class/Interface/TypeAlias reflections and silently droppedVariable-kind exports — so publicInjectionTokens and otherexport consts were undocumented (LANGGRAPH_CLIENT_OPTIONS,LANGGRAPH_CLIENT,LANGGRAPH_THREADS_CONFIG,VIEW_REGISTRY,RENDER_CONFIG,CHAT_CONFIG, …).Changes
ReflectionKind.Variable→kind: 'const'branch (emits name + type signature + description); extend theApiDocEntry.kindunion.ApiDocRenderer.tsx): extend the consumerkindunion with'const'.KindBadge/signature already render generically — no other consumer (page.tsx,llms-full.txt/route.ts) needed changes.api-docs.jsonfor langgraph (+5), chat (+17), render (+6), licensing (+1), telemetry (+1) — 30 newly-documented consts.Verification
nx build websitepasses (249 static pages) — the newkind: 'const'entries render without breaking the build.copilotkitreferences in the diff.Note: chat's
REASONING_FIXTURE_*come from@threadplane/chat/testing(public testing utils) — documenting them is correct but may read as surprising in the main API docs; left in for a minimal, consistent fix.Discovered while shipping #681 (the
LANGGRAPH_CLIENT_OPTIONStoken), intentionally split out to keep that PR scoped.🤖 Generated with Claude Code