(v2.2.0) Optional properties with type: array
allow it's values to be undefined in zod shape
#768
Labels
bug
Something isn't working
What version of
kubb
is running?2.2.0
What platform is your computer?
Windows 11
What version of external packages are you using(
@tanstack-query
,MSW
,React
,Vue
, ...)No response
What steps can reproduce the bug?
Upon upgrading from v2.1.5 to v2.2.0 kubb generates properties that are of type
array
and optional to shapes that have their items set to optional too.This adds
undefined
as possible value to the type of the array and also allows to pass undefined as the value.@kubb/swagger-zod
as pluginitems
option to ref to a openapi componentThe example spec generates (manually stiched together for demonstration):
How often does this bug happen?
Every time
What is the expected behavior?
Items of optional arrays are not set to be optional as in v2.1.5
Swagger/OpenAPI file?
Additional information
No response
The text was updated successfully, but these errors were encountered: