Fix output.header config not applied to bundled client files#3438
Fix output.header config not applied to bundled client files#3438
Conversation
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: c66d565 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 |
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
|
@copilot remove the hard-coded default value altogether and fully depend on the output.header value flowing from the configuration. Add the same functionality to openapi-python if not already present. |
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Done in 077adc6. Removed the hardcoded fallback from |
|
Leaping into action... |
|
@copilot Typecheck fails, can't use split on readonly array |
… for ReadonlyArray Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Fixed in c66d565. |
@hey-api/codegen-core
@hey-api/json-schema-ref-parser
@hey-api/nuxt
@hey-api/openapi-ts
@hey-api/shared
@hey-api/types
@hey-api/vite-plugin
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3438 +/- ##
==========================================
- Coverage 40.11% 40.09% -0.02%
==========================================
Files 476 476
Lines 17459 17467 +8
Branches 5287 5293 +6
==========================================
Hits 7004 7004
- Misses 8414 8418 +4
- Partials 2041 2045 +4
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:
|

replaceImportsingenerate/client.tsused a hardcoded header instead of the configuredoutput.headerfor bundled client files (when usingbundle: truewith@hey-api/client-*plugins)outputHeaderToPrefixhelper function to convertOutputHeaderto a string prefixreplaceImportsto accept and use the configuredheaderparameter (without hardcoded fallback — default flows fromgetOutput)generateClientBundleto acceptheader: OutputHeaderand pass it toreplaceImportsgenerate/output.tsto passconfig.output.headertogenerateClientBundleoutputHeaderToPrefixlogic inopenapi-tsopenapi-ts/generate/client.ts— fully depend onoutput.headervalue from configoutputHeaderToPrefix+headerparameter pattern toopenapi-python/generate/client.tsopenapi-python/generate/output.tsto passconfig.output.headertogenerateClientBundleoutputHeaderToPrefixlogic inopenapi-pythonArray.isArray()doesn't narrow awayReadonlyArray<string>in the false branch; usetypeof header === 'string'instead for proper type narrowingOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.