Overriding Input Schemas to allow for non-object inputs #897
-
Hi, Working on migrating an existing API to express-zod-api for better documentation and type enforcement, but running into an issue with an existing endpoint. I have a For a similar thing on the response side, I know we can override the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello @TheWisestOne , |
Beta Was this translation helpful? Give feedback.
Hello @TheWisestOne ,
Middlewares provide you with direct access to request object. You can check it with Array.isArray() and return as a property inside the options, accessible by endpoints.
All that is beyond the proper types support.
But it might work this way.