Skip to content

feat(codegen): support explicit unions and RPC body schemas - #40

Merged
leemour merged 1 commit into
mainfrom
feat/bot-api-schemas
Oct 3, 2026
Merged

leemour merged 1 commit into
mainfrom
feat/bot-api-schemas

Conversation

@leemour

@leemour leemour commented Oct 3, 2026

Copy link
Copy Markdown
Owner

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.

@leemour
leemour merged commit 58fed51 into main Oct 3, 2026
4 checks passed
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