feat(typescript): add toggles to disable generated request/response/error/client options#3837
feat(typescript): add toggles to disable generated request/response/error/client options#3837SM-OliLegg wants to merge 5 commits into
Conversation
|
|
|
Reviewed PR #3837. Submitted review identifying a critical dangling Task list (5/5 completed)
|
|
@SM-OliLegg is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 4522ef8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
TL;DR — Adds granular feature toggles for disabling individual code-generation artifacts. The Key changes
Summary | 12 files | 2 commits | base: Feature toggles for TypeScript operation aliases
When set to
Independent disable of
|
|
TL;DR — Adds granular toggles to the Key changes
Summary | 8 files | 11 commits | base: Toggle TypeScript operation artifact generation
The plugin's
Test and documentation coverage
The integration test creates a minimal OpenAPI 3.1 spec with |
There was a problem hiding this comment.
Caution
Dangling $refs when only one readWrite variant is enabled — the original schema is removed but refs in the disabled variant's context are never rewritten, leaving broken pointers.
Summary: This PR adds the ability to independently disable readWrite split variants (requests/responses) in the parser config and disable TypeScript operation artifacts (requests, responses, errors, clientOptions). The TypeScript plugin changes are clean, but the splitSchemas changes in readWrite.ts introduce a correctness bug in the asymmetric case. Several housekeeping items are also missing.
Missing items:
- No PR description explaining the motivation or usage
- No tests (the diff against main shows test additions but they are not present in the actual commit)
- No documentation changes (same — appear in GitHub diff but are not in the commit)
- No changeset file (this repo uses changesets for releases, not manual
CHANGELOG.mdentries) pnpm-lock.yamlhas large changes (720 additions / 835 deletions) that seem unrelated to this feature — likely caused by running a different pnpm version or re-resolving the lockfile
Task list (5/5 completed)
- Read PR description and diff TOC
- Read and analyze each changed file in the diff
- Investigate impact of changes (grep for stale references, breaking changes)
- Draft review comments and self-critique
- Submit review
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3837 +/- ##
==========================================
+ Coverage 37.70% 37.78% +0.07%
==========================================
Files 582 582
Lines 20844 20849 +5
Branches 6063 6072 +9
==========================================
+ Hits 7860 7877 +17
+ Misses 10570 10560 -10
+ Partials 2414 2412 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Reviewed commit Task list (5/5 completed)
|
|
Reviewed commit Task list (6/6 completed)
|
|
Author addressed the review feedback in commit Task list (3/3 completed)
|
|
Reviewed commit Task list (4/4 completed)
|
@hey-api/codegen-core
@hey-api/json-schema-ref-parser
@hey-api/nuxt
@hey-api/openapi-ts
@hey-api/shared
@hey-api/spec-types
@hey-api/types
@hey-api/vite-plugin
commit: |
dd19c6f to
d7df040
Compare
f2e533c to
97fd860
Compare
8afdb97 to
4522ef8
Compare

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