-
Notifications
You must be signed in to change notification settings - Fork 81
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
Cannot read property 'imports' of undefined #13
Comments
@lamuertepeluda |
@lamuertepeluda |
@lamuertepeluda "geometry": {
"type": "geoJSON geometry"
}, |
Hi @Manweill, thanks for investigating. Maybe even better storing in a local variable and throwing it after unlinking files and the console.timeEnd() of line 177, like let err = null
/*... do things */
catch(error){
err = error
}
/*... do other things */
if(err){
throw err;
} Regarding the type name, they are autogenerated using nest-swagger using TS definitions and reflect-metadata (our server is written entirely in TypeScript with nestjs). Although we know that this nest-swagger module has for sure its good share of issues, we currently auto-generate client-side api module with this other generator named swagger-es6, and it's not having troubles with entity names. I liked more your approach since your library is entirely in TS, and it also easily allows for using a separate axios instance, so I'm trying it. But I got stuck 😅 Debugging with VSCode I found 2 different errors when running the codegen script, depending on methodNameMode
Could calling |
Thanks for suggestion. |
While the spaces problems looks simpler to be solved, how about setting a default type for all non-base JS/TS types? Another solution may be using some generic, like |
emm... BTW, what do you think I have to provide a conversion entrance? |
this could definitely work, if you know the generated types in advance. But I would fallback with Object or any when not transformer is provided. |
Test in your project and commit PRs |
I double check your swagger.json. Your api was RESTful api. But it doesn't had |
Hi @Manweill you are indeed right, we are not (yet) using operationId in that API. |
The issue was too long |
Hi,
I think you should add a check at this line of code https://github.com/Manweill/swagger-axios-codegen/blob/master/src/requestCodegen/index.ts#L54 and line above, like
I get this error
which is also swallowed, i.e.
codegen()
does not throw, but also does not generate the api.The text was updated successfully, but these errors were encountered: