Skip to content

fix(transformers): respect additionalProperties when generating object map transforms#3409

Open
codercms wants to merge 1 commit intohey-api:mainfrom
codercms:fix/transformers-additional-properties
Open

fix(transformers): respect additionalProperties when generating object map transforms#3409
codercms wants to merge 1 commit intohey-api:mainfrom
codercms:fix/transformers-additional-properties

Conversation

@codercms
Copy link

  • transformers plugin now handles additionalProperties in object schemas
  • Applies transforms to map values from additionalProperties while skipping declared properties
  • Adds regression test fixture for transformers-additional-properties

P.S. Generated code could be improved by using something like:

for (const key of Object.keys(data) {
     data[key] = transformFn(data[key]);
}

But I didn't found a for-loop builder

…t map transforms

* `transformers` plugin now handles `additionalProperties` in object schemas
* Applies transforms to map values from `additionalProperties` while skipping declared properties
* Adds regression test fixture for `transformers-additional-properties`
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel
Copy link

vercel bot commented Feb 17, 2026

@codercms is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

🦋 Changeset detected

Latest commit: 4de44fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@test/openapi-ts Patch
@hey-api/openapi-ts Patch

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

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. bug 🔥 Broken or incorrect behavior. labels Feb 17, 2026
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.88%. Comparing base (5ae69ba) to head (4de44fc).

Files with missing lines Patch % Lines
...api-ts/src/plugins/@hey-api/transformers/plugin.ts 0.00% 8 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3409      +/-   ##
==========================================
- Coverage   38.91%   38.88%   -0.03%     
==========================================
  Files         473      473              
  Lines       17287    17299      +12     
  Branches     5210     5214       +4     
==========================================
  Hits         6727     6727              
- Misses       8480     8488       +8     
- Partials     2080     2084       +4     
Flag Coverage Δ
unittests 38.88% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 17, 2026

Open in StackBlitz

@hey-api/codegen-core

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/codegen-core@3409

@hey-api/json-schema-ref-parser

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/json-schema-ref-parser@3409

@hey-api/nuxt

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@3409

@hey-api/openapi-ts

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@3409

@hey-api/shared

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/shared@3409

@hey-api/types

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/types@3409

@hey-api/vite-plugin

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@3409

commit: 4de44fc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🔥 Broken or incorrect behavior. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant