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

TypeError: Cannot read properties of undefined (reading 'startsWith') #45

Closed
andreas-soroko opened this issue Nov 30, 2022 · 3 comments
Closed

Comments

@andreas-soroko
Copy link

Huhu,

getting the following error on openapi-zod-client <file> -a --export-schemas --group-strategy 'tag'.
(any group-strategy seems to fail)

if (schemaName.startsWith("z.")) return;
                             ^

TypeError: Cannot read properties of undefined (reading 'startsWith')
    at addDependencyIfNeeded (node_modules/openapi-zod-client/dist/generateZodClientFromOpenAPI-8e9ca210.cjs.dev.js:1967:24)
    at node_modules/openapi-zod-client/dist/generateZodClientFromOpenAPI-8e9ca210.cjs.dev.js:1972:16
    at Array.forEach (<anonymous>)

for the same payload as here

@astahmer
Copy link
Owner

ok got it, looking into it right now !

@astahmer
Copy link
Owner

fixed & published in 1.4.2

@andreas-soroko
Copy link
Author

fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants