hey-api / openapi-ts

🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more. Support: @mrlubos
https://heyapi.dev
Other
1.39k stars 107 forks source link

fix: handle discriminators in experimental parser #1267

Closed mrlubos closed 1 week ago

mrlubos commented 1 week ago

Closes https://github.com/hey-api/openapi-ts/issues/993

stackblitz[bot] commented 1 week ago

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

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: ff3aa4ac58068671d2b9eedbd7528eb4f9969386

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[bot] commented 1 week ago

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 Nov 10, 2024 9:01pm
codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 52.88136% with 139 lines in your changes missing coverage. Please review.

Project coverage is 67.56%. Comparing base (04c88dd) to head (ff3aa4a). 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 9.48% 105 Missing :warning:
...ages/openapi-ts/src/openApi/3.1.x/parser/schema.ts 76.06% 28 Missing :warning:
.../openapi-ts/src/plugins/@hey-api/schemas/plugin.ts 50.00% 3 Missing :warning:
...enapi-ts/src/openApi/shared/utils/discriminator.ts 85.71% 2 Missing :warning:
...kages/openapi-ts/src/openApi/3.0.x/parser/index.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1267 +/- ## ========================================== - Coverage 67.63% 67.56% -0.08% ========================================== Files 132 133 +1 Lines 19684 19841 +157 Branches 1775 1784 +9 ========================================== + Hits 13314 13405 +91 - Misses 6366 6432 +66 Partials 4 4 ``` | [Flag](https://app.codecov.io/gh/hey-api/openapi-ts/pull/1267/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/hey-api/openapi-ts/pull/1267/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | `67.56% <52.88%> (-0.08%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.