mrjono1 / joi-to-typescript

Convert Joi Schemas to TypeScript interfaces
MIT License
124 stars 39 forks source link

Fix the edge case where defaults are treated as required but we explicitely want to pass the `optional` flag. #380

Closed cmaster11 closed 8 months ago

cmaster11 commented 9 months ago

As per title, if defaults are required and we manually pass the optional flag, at the moment the flag will be ignored.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8d65254) 98.69% compared to head (568d2eb) 98.69%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #380 +/- ## ======================================= Coverage 98.69% 98.69% ======================================= Files 9 9 Lines 535 537 +2 Branches 206 208 +2 ======================================= + Hits 528 530 +2 Misses 7 7 ``` | [Files](https://app.codecov.io/gh/mrjono1/joi-to-typescript/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jono) | Coverage Δ | | |---|---|---| | [src/parse.ts](https://app.codecov.io/gh/mrjono1/joi-to-typescript/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jono#diff-c3JjL3BhcnNlLnRz) | `97.45% <100.00%> (+0.01%)` | :arrow_up: |

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

mrjono1 commented 9 months ago

looks good ill look at this soon

cmaster11 commented 8 months ago

Liiittle reminder that this exists :)

mrjono1 commented 8 months ago

released :) thanks for the contribution https://github.com/mrjono1/joi-to-typescript/releases/tag/4.10.0