[zod-openapi] null
and undefined
types casted as strings for multipart/form-data
#965
Labels
null
and undefined
types casted as strings for multipart/form-data
#965
Which middleware has the bug?
@hono/zod-openapi
What version of the middleware?
0.18.3
What version of Hono are you using?
4.6.19
What runtime/platform is your app running on? (with version if possible)
Node
What steps can reproduce the bug?
Consider the following route definition:
The router handler correctly inherits the type of the
passcode
variable:In runtime, however,
passcode
is always casted to string, aka"undefined"
or"null"
. This has caused bugs in runtime.What is the expected behavior?
Should be casted to proper JS type:
null
orundefined
What do you see instead?
Instead see these types as strings:
"undefined"
Additional information
In my Node.js REPL i've verified this is not Zod-related and the objects are being validated properly:
The text was updated successfully, but these errors were encountered: