Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zod: Components override not working #1299

Open
Arnagos opened this issue Apr 5, 2024 · 1 comment
Open

Zod: Components override not working #1299

Arnagos opened this issue Apr 5, 2024 · 1 comment
Labels
bug Something isn't working zod Zod related issue

Comments

@Arnagos
Copy link

Arnagos commented Apr 5, 2024

What are the steps to reproduce this issue?

  1. 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

@melloware melloware added the bug Something isn't working label Apr 5, 2024
@anymaniax
Copy link
Owner

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.

@melloware melloware added the zod Zod related issue label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working zod Zod related issue
Projects
None yet
Development

No branches or pull requests

3 participants