Replies: 2 comments 2 replies
-
Hi @DevShaded! I'm Dosu and I’m helping the openapi-ts team. hey-api/openapi-ts does not currently provide a way to configure the Zod locale or error messages through its config. To localize Zod validation errors, you need to use Zod’s own localization features—such as setting a custom error map—directly in your application code, after generating the schemas with hey-api. This usually means calling To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
@DevShaded I'm not sure I understand the ask, why can't you change the locale in Zod? What would be the benefit of doing it in Hey API? https://zod.dev/error-customization#internationalization |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using zod for generating schema from openapi, and I was wondering how can I change the language/locale for zod? In zod you can change the locale within a config, but how can I change the locale within the config for hey api?
Beta Was this translation helpful? Give feedback.
All reactions