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

Invalid Code generated by @kubb/plugin-zod #1496

Open
benboothby opened this issue Jan 8, 2025 · 0 comments
Open

Invalid Code generated by @kubb/plugin-zod #1496

benboothby opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working @kubb/plugin-zod

Comments

@benboothby
Copy link

What version of kubb is running?

3.4.0

What kind of platform do you use?

Linux

How does your kubb.config.ts config look like

No response

Swagger/OpenAPI file?

No response

What version of external packages are you using(@tanstack-query, MSW, React, Vue, ...)

No response

What steps can reproduce the bug?

https://codesandbox.io/p/devbox/kubb-zod-tuple-example-j75v58

This example using '@kubb/plugin-ts' and '@kubb/plugin-zod' on a public TiTiler API shows a lot of the errors I've experienced trying to update to v3.x from v2.28.4.
There are two main error types that stand out:

  • Most errors are coming from the newly added ToZod utility type, which seems to be far too strict
  • There are import errors in the zod files, where the casing in the file name is different from what the ts plugin produces. For example, see tileCogTilesTileMatrixSetIdZXYFormatGetSchema.ts or any file with ZXY in the name.

How often does this bug happen?

Every time

What is the expected behavior?

No response

Additional information

No response

@benboothby benboothby added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @kubb/plugin-zod
Projects
None yet
Development

No branches or pull requests

2 participants