Closed anymaniax closed 1 month ago
@anymaniax @melloware
Although it is an undocumented specification, it is actually possible to configure it so that coerce
is used even when the coerceTypes
option is specified.
https://github.com/anymaniax/orval/blob/master/packages/zod/src/index.ts#L327-L329
However, you cannot specify parameters and it will apply to all objects. I think the options supported this time are good because they can be set in more detail.
From an overall perspective, there are multiple options with the same settings, so I would like to unify them. My suggestion is to deprecate coerceTypes
and remove it in the next two versions, what do you think?
@soartec-lab I already added the deprecated warning on coerceTypes
. if you use it or in the documentation directly
@anymaniax Oops, you already deprecated it on this PR. I'm careful to remove it in the next two versions or later.
Status
READY
Description
Add option coerce to zod client