node-red / node-red-node-swagger

A set of tools for generating Swagger api documentation based on the HTTP nodes deployed in a flow
Apache License 2.0
62 stars 47 forks source link

HTTP-In affinity to swagger-doc node #3

Closed knolleary closed 9 years ago

knolleary commented 9 years ago

The HTTP In edit dialog currently displays the default, automatically generated, config node select box if the swagger node is installed.

Unlike other uses of config nodes, I don't think it makes sense to allow the user to pick from a list of existing swagger-doc nodes. There should be a closer affinity between the nodes - it either has a swagger-doc node associated or it doesn't.

We could either hack in special handling for this case in the HTTP In node, or add a more generic solution in the editor. Where a node identifies its relationship to a config node, we could add a flag (name tbd) to indicate the UI should offer a single button (either 'add' or 'edit' depending on what state it is in) rather than the select box.

knolleary commented 9 years ago

Added the new exclusive option over here: https://github.com/node-red/node-red/commit/913fdac67180c4d343d5e74321d9b6ddc70b5ad7