-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Issue generating types remotely using Node v20 #62
Comments
Very possible. Try upgrading it and see if it fixes the issue |
I mean the library seems to be under openapicmd or the axios version should be updated |
openapicmd is free and open source :) please execute ✅ |
I looked into this and it seems like the issue might be a dependencys dependency... |
Nice job! 💪 |
After a bit of testing it turns out it is possibly an issue with Node v20 instead. I don't really know if its some setting that is required for it to work or should the http request in json-schema-ref-parser need to be adjusted for it to work. Node v16 and Node v18 works still. |
This ended up being a Node v20 / platform issue on our end. For people interested: we are generating types from a local API and the URL to the API is along the lines of This URL worked previously (Node v16) but after switching to Node v20 we had to change the URL for the command from I'm not sure if it's possible to add some host option to the command that would be set for the created connection to get the "custom" host work locally. |
Case closed |
Hello!
I'm having an issue with generating types remotely using Node v20.
I've been running the following command.
openapi typegen http://localhost:8080/o/openapi-rest/v1.0/openapi.yaml > ./openapi.d.ts -H "Authorization: Basic xxxx"
This used to work still with Node v16, but after upgrading to v20 I get the following error.
ResolverError: Error downloading xxx socket hang up at /node_modules/@apidevtools/json-schema-ref-parser/lib/resolvers/http.js:127:16
Is there a need to modify my command or is it possible that the above mentioned library is deprecated for Node v20?
The text was updated successfully, but these errors were encountered: