swagger.json > missing configuration node?
lgrkvst opened this issue · 0 comments
lgrkvst commented
What are the steps to reproduce?
Given the following simple swagger.json
:
{
"swagger": "2.0",
"info": {
"version": "v1",
"title": "ActiveDirectory"
},
"host": "ad-api.company.com",
"schemes": [
"https"
],
"paths": {
"/api/Group/{name}": {
"get": {
"tags": [
"Group"
],
"operationId": "Group_GetGroup",
"consumes": [],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ActiveDirectoryGroup"
}
}
}
}
}
}
}
- Run
> node-red-nodegen swagger.json
- Import node into node-red
- Create a simple
inject->node->debug
flow - Deploy and run
What happens?
Node Red produces the following error: Host in configuration node is not specified.
What do you expect to happen?
Either of:
- let node.js contain hardcoded values for host and schemes (and baseUrl)
- generate input boxes for host, schemes and baseUrl in node.html, and handling of these inputs in node.js.
- optionally in combination with above, parse host, schemes and baseUrl from
msg.payload
. - have a configuration node generated alongside the node that lets me specify host, schemes and baseUrl
Please tell us about your environment:
- Node generator version: 0.2.4