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

The default sample is failing node-red-nodegen http://petstore.swagger.io/v2/swagger.json #118

Open
6 tasks done
beejones opened this issue Jan 16, 2021 · 2 comments
Open
6 tasks done

Comments

@beejones
Copy link

What are the steps to reproduce?

Used the sample in your readme
node-red-nodegen http://petstore.swagger.io/v2/swagger.json

What happens?

Error: TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received an instance of Object
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received an instance of Object
at validateString (internal/validators.js:124:11)
at Url.parse (url.js:159:3)
at Object.urlParse [as parse] (url.js:154:13)
at dispatchHttpRequest (C:\dev\node red\node-red-nodegen\node_modules\axios\lib\adapters\http.js:66:22)
at new Promise ()
at httpAdapter (C:\dev\node red\node-red-nodegen\node_modules\axios\lib\adapters\http.js:21:10)
at dispatchRequest (C:\dev\node red\node-red-nodegen\node_modules\axios\lib\core\dispatchRequest.js:52:10)
at getSpec (C:\dev\node red\node-red-nodegen\lib\swagger\index.js:26:28)
at Object.module.exports [as SwaggerNodeGenerator] (C:\dev\node red\node-red-nodegen\lib\swagger\index.js:53:16)

What do you expect to happen?

It should generate nodes

Please tell us about your environment:

  • Node generator version: 0.1.0
  • Node-RED version:Node-RED v1.2.6
  • Node.js version:v14.15.1
  • npm version:.14.8
  • Platform/OS: windows 10 Version 10.0.19042.746
  • Browser: edge
@t-huyeng
Copy link

The sample is working just fine for me using ubuntu.

@j2l
Copy link

j2l commented Feb 8, 2021

Maybe you need the extra step for Windows.
Have a look at https://kazuhitoyokoi.medium.com/procedures-to-develop-node-red-node-from-openapi-document-8685fdc7e90a

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

3 participants