Closed gimenete closed 1 year ago
Hey @gimenete thats a issue that is being fixed in the new v1.0 version, this new version also brings support for zod everywhere
in the pre release optional parameters missing will be let undefined in the validated data object
i'm not sure when are we going to release this new version, but you can already try it out by installing the prerelease version in the pr here
We are already using this new pre release version for our production workloads, and i don't expect the api to change anymore before the release
Cool. I'm not sure when I'll be able to give it a try, but this is great news! Thanks!
Hey @gimenete, i've just published the new v1.0.0 release that fixes this issue, now every optional parameter that is not received by the endpoint is let undefined Migration guide to 1.0.0 available here
I've found myself needing a request body param to be either a string or null in a
PATCH
request. There's arequired
option, which means the param can be omited, but what I need is a explicit way to set a value asnull
, specially because I'm usingPATCH
to do partial updates or records in the database.So far I've been using empty strings as a way to indicate that, but it's not ideal. It's confusing for the users of my API.
Thanks!