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: Zod plugin handles value constraints and defaults #1319

Closed mrlubos closed 14 hours ago

stackblitz[bot] commented 14 hours ago

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

vercel[bot] commented 14 hours 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 21, 2024 0:14am
changeset-bot[bot] commented 14 hours ago

🦋 Changeset detected

Latest commit: af76a7705c585fcfae0c72872f358936f7d19d56

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

codecov[bot] commented 14 hours ago

Codecov Report

Attention: Patch coverage is 15.61338% with 227 lines in your changes missing coverage. Please review.

Project coverage is 65.12%. Comparing base (a134d19) to head (af76a77). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/openapi-ts/src/plugins/zod/plugin.ts 1.10% 179 Missing :warning:
...ages/openapi-ts/src/openApi/3.0.x/parser/schema.ts 0.00% 36 Missing :warning:
...ages/openapi-ts/src/openApi/3.1.x/parser/schema.ts 83.33% 6 Missing :warning:
.../src/plugins/@tanstack/query-core/plugin-legacy.ts 0.00% 2 Missing :warning:
...napi-ts/src/plugins/@tanstack/query-core/plugin.ts 0.00% 2 Missing :warning:
...openapi-ts/src/plugins/@hey-api/services/plugin.ts 50.00% 1 Missing :warning:
...api-ts/src/plugins/@hey-api/types/plugin-legacy.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1319 +/- ## ========================================== - Coverage 65.23% 65.12% -0.12% ========================================== Files 138 137 -1 Lines 21053 21124 +71 Branches 1816 1825 +9 ========================================== + Hits 13734 13757 +23 - Misses 7315 7363 +48 Partials 4 4 ``` | [Flag](https://app.codecov.io/gh/hey-api/openapi-ts/pull/1319/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/1319/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | `65.12% <15.61%> (-0.12%)` | :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.


🚨 Try these New Features: