Skip to content

Commit 972b663

Browse files
stephentoubCopilot
andauthored
Add $ref support to all four language code generators (#1062)
* Add $ref support to all four language code generators Enable JSON Schema $ref for type deduplication across all SDK code generators (TypeScript, Python, Go, C#). Changes: - utils.ts: Add resolveRef(), refTypeName(), collectDefinitions() helpers; normalize $defs to definitions in postProcessSchema - typescript.ts: Build combined schema with shared definitions and compile once via unreachableDefinitions, instead of per-method compilation - python.ts/go.ts: Include all definitions alongside SessionEvent for quicktype resolution; include shared API defs in RPC combined schema - csharp.ts: Add handling to resolveSessionPropertyType and resolveRpcType; generate classes for referenced types on demand Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Align rebased ref generator changes Keep the rebased $ref generator follow-up aligned with the latest C# typing changes and clean up the Python/TypeScript generator adjustments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Handle mixed schema definitions in codegen Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refresh $ref codegen for latest schema Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix ref codegen review issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6722743 commit 972b663

File tree

6 files changed

+1162
-530
lines changed

6 files changed

+1162
-530
lines changed

0 commit comments

Comments
 (0)