orval
orval copied to clipboard
Zod: Components override not working
What are the steps to reproduce this issue?
- Generate with the following settings
Validators: {
input: { target: './swagger.json' },
output: {
mode: 'tags',
target: 'src/schemas/api',
client: 'zod',
indexFiles: false,
prettier: true,
override: {
components: {
responses: { suffix: 'ResponseSchema' },
parameters: { suffix: 'ParamsSchema' },
requestBodies: { suffix: 'BodiesSchema' }
}
}
}
What happens?
The suffix overrides defined are not respected. Instead of i.e. ***ResponseSchema I still get ***Response.
What were you expecting to happen?
I expect the override to be respected.
Any logs, error output, etc
None
Any other comments?
What versions are you using?
Operating System: Windows 11 Package Version: 6.26.0 Browser Version: n/a
it's not exactly the same since on zod we don't handle the schemas with the components section but directly on each path. We could add an option to do it with zod too.
Hi @anymaniax . I'm having the same issue as OP.
Is there any way to do this currently? I would really like to end my zod schemas with "Schema"