feat(typescript): add toggles to disable generated request/response/error/client options#3837
Open
SM-OliLegg wants to merge 8107 commits into
Open
feat(typescript): add toggles to disable generated request/response/error/client options#3837SM-OliLegg wants to merge 8107 commits into
SM-OliLegg wants to merge 8107 commits into
Conversation
…t and add biome:check preset Agent-Logs-Url: https://github.com/hey-api/openapi-ts/sessions/c7f5000d-01ad-4791-bd4e-64e753ec4f5f
… intersections When discriminated union members have allOf schemas, they generate ZodIntersection which does not support .extend(). Detect this case by storing isIntersection: true in the symbol meta and fall back to z.union() in tryBuildDiscriminatedUnion. - Add isIntersection field to ZodMeta type - Set isIntersection: true in intersection() handler of all three walkers - Set isIntersection: false in union() handler (manual meta) of all three walkers - Merge ctx.meta with isIntersection flag in processor exportAst calls - Check querySymbol meta for isIntersection in tryBuildDiscriminatedUnion - Add test specs and snapshots for the discriminator-allof-member scenario Agent-Logs-Url: https://github.com/hey-api/openapi-ts/sessions/1c6f992d-8feb-49c9-9cc6-7830259cfe5c
response/request object may become undefined after the changes, but in our test case we can always assert they do exists.
docs: update sponsors copy
chore: update pydantic syntax
refactor: typescript plugin
…nodes refactor: resolver node type
docs: add tanstack start plugin
fix(params): guard __proto__, constructor, and prototype sub-keys
refactor: plugin hooks order
f2e533c to
97fd860
Compare
8afdb97 to
4522ef8
Compare
mrlubos
requested changes
May 24, 2026
mrlubos
left a comment
Member
There was a problem hiding this comment.
@SM-OliLegg this looks like #3870 on steroids. I can get behind the enabled changes, but not clientOptions. What would happen if you disable it and add a client plugin? Btw I'm pretty sure you can disable ANY output through hooks today, so this pull request is more of a syntax sugar on top of that (which is valid)
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.
Ref: #3850
Hi! I want to make
@hey-api/typescriptoutput more configurable for teams that prefer minimal generated artifacts. This PR adds controls to reduce generated TypeScript artifacts when needed.What’s added
@hey-api/typescriptplugin toggles:requests: falseresponses: falseerrors: falseclientOptions: falseWhy
Some teams only want core schema/definition types. These changes make that output mode configurable.
Included in this PR
readWrite, plus per-variantrequests/responsescontrols)@hey-api/typescriptplugin toggles forrequests,responses,errors, andclientOptions