fix: vite plugin loads default openapi-ts config file when no explicit config is provided#3793
fix: vite plugin loads default openapi-ts config file when no explicit config is provided#3793
Conversation
|
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
TL;DR — This is an empty WIP draft PR opened to fix #3792, where the Vite plugin ignores the default Key changes
Summary | 0 files | 0 commits | base: |
There was a problem hiding this comment.
This is an empty WIP draft PR — it contains a single "Initial plan" commit with zero file changes. There's nothing to review yet. Will re-review once implementation commits are pushed.
Task list (3/3 completed)
- Checkout PR and read diff
- Investigate PR changes and Vite plugin code
- Submit review
…t config is provided Agent-Logs-Url: https://github.com/hey-api/openapi-ts/sessions/3bf93d77-0839-4ea5-839e-d389b246d955
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3793 +/- ##
=======================================
Coverage 39.80% 39.80%
=======================================
Files 530 530
Lines 19467 19470 +3
Branches 5791 5793 +2
=======================================
+ Hits 7748 7751 +3
Misses 9487 9487
Partials 2232 2232
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:
|

When
heyApiPlugin()is used invite.config.jswithout aconfigoption, no client generation occurs even if anopenapi-ts.config.tsfile exists in the project root.Root cause
createClient(undefined)resolves touserConfigs = []ingenerate.ts. SinceresolveJobsininit.tsonly callsloadConfigFileper entry inuserConfigs, an empty array means the default config file is never discovered.Fix
In
resolveJobs(packages/openapi-ts/src/config/init.ts):userConfigsis empty (implicit call with no config), fall back to a single empty config{}to trigger the defaultopenapi-ts.config.tslookup viac12foundConfig === trueor the user explicitly provided configs — prevents spurious "missing input/output" validation errors on implicit no-op calls while preserving existing CLI validation behaviorBehavior matrix
openapi-ts.config.tspresentWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
fonts.googleapis.com/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node /home/REDACTED/work/openapi-ts/openapi-ts/node_modules/.pnpm/next@15.2.4_react-dom@19.0.0_react@19.0.0__react@19.0.0_sass@1.97.3/node_modules/next/dist/compiled/jest-worker/processChild.js(dns block)If you need me to access, download, or install something from one of these locations, you can either: