Repository navigation
feat(codegen): support explicit unions and RPC body schemas - #40
Merged
Merged
Conversation
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 Telegram API needs explicit schema alternatives, recursive unions, Boolean literals, and RPC fields in the JSON body. Extend cli-core's existing API generators to preserve those constructs instead of weakening them to unknown.
Add a definitions generator so shared input handling can traverse the same schema model at runtime, including multipart reference formats. Generation rejects empty unions/enums and unresolved references inside alternatives. Existing HTTP models retain their generated artifacts.
Validation: lint, typecheck, full coverage suite, docs, build, and Bun smoke. A generated fixture compiles types, validators, manifest, and definitions together, then checks large integer precision, recursive alternatives, Boolean literals and multipart references. Existing generator tests pass unchanged.