Skip to content

fix: handle discriminator with multiple mappings to the same schema#1986

Merged
mrlubos merged 1 commit into
mainfrom
fix/discriminator-mapping-many
Apr 28, 2025
Merged

fix: handle discriminator with multiple mappings to the same schema#1986
mrlubos merged 1 commit into
mainfrom
fix/discriminator-mapping-many

Conversation

@mrlubos

@mrlubos mrlubos commented Apr 28, 2025

Copy link
Copy Markdown
Member

Closes #1805
Closes #1905

@bolt-new-by-stackblitz

Copy link
Copy Markdown

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

@changeset-bot

changeset-bot Bot commented Apr 28, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dbebff8

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

This PR includes changesets to release 1 package
Name Type
@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

@vercel

vercel Bot commented Apr 28, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hey-api-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2025 1:57am

@mrlubos mrlubos marked this pull request as ready for review April 28, 2025 01:56
@pkg-pr-new

pkg-pr-new Bot commented Apr 28, 2025

Copy link
Copy Markdown

Open in StackBlitz

@hey-api/client-axios

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-axios@1986

@hey-api/client-fetch

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-fetch@1986

@hey-api/client-next

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-next@1986

@hey-api/client-nuxt

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

@hey-api/nuxt

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

@hey-api/openapi-ts

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

@hey-api/vite-plugin

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

commit: dbebff8

@codecov

codecov Bot commented Apr 28, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 3.12500% with 124 lines in your changes missing coverage. Please review.

Project coverage is 22.17%. Comparing base (e62235d) to head (dbebff8).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ages/openapi-ts/src/openApi/3.0.x/parser/schema.ts 1.92% 51 Missing ⚠️
...ages/openapi-ts/src/openApi/3.1.x/parser/schema.ts 1.92% 51 Missing ⚠️
...ages/openapi-ts/src/openApi/2.0.x/parser/schema.ts 6.66% 14 Missing ⚠️
...enapi-ts/src/openApi/shared/utils/discriminator.ts 11.11% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1986      +/-   ##
==========================================
- Coverage   22.25%   22.17%   -0.09%     
==========================================
  Files         251      251              
  Lines       21161    21240      +79     
  Branches      783      783              
==========================================
  Hits         4709     4709              
- Misses      16446    16525      +79     
  Partials        6        6              
Flag Coverage Δ
unittests 22.17% <3.12%> (-0.09%) ⬇️

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.

@mrlubos mrlubos merged commit 830739e into main Apr 28, 2025
@mrlubos mrlubos deleted the fix/discriminator-mapping-many branch April 28, 2025 02:01
@github-actions github-actions Bot mentioned this pull request Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect Type Generation for Discriminator Mappings: Common Schema Discriminator Values Not Fully Propagated Missing mapping in oneOf with discriminator

1 participant