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

swagger.json > missing configuration node? #135

Open
1 task done
lgrkvst opened this issue Jun 20, 2022 · 0 comments
Open
1 task done

swagger.json > missing configuration node? #135

lgrkvst opened this issue Jun 20, 2022 · 0 comments

Comments

@lgrkvst
Copy link

lgrkvst commented Jun 20, 2022

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
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

1 participant