1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Added support for swagger doc to HTTP-In

This commit is contained in:
Cody Walker 2015-04-24 13:53:38 -05:00
parent c016b102eb
commit e9ce519e4b
2 changed files with 10 additions and 2 deletions

View File

@ -32,6 +32,10 @@
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"> <input type="text" id="node-input-name" placeholder="Name">
</div> </div>
<div class="form-row row-swagger-doc">
<label for="node-input-name"><i class="fa fa-tag"></i> Doc</label>
<input type="text" id="node-input-swaggerDoc">
</div>
<div id="node-input-tip" class="form-tips">The url will be relative to <code><span id="node-input-path"></span></code>.</div> <div id="node-input-tip" class="form-tips">The url will be relative to <code><span id="node-input-path"></span></code>.</div>
</script> </script>
@ -157,7 +161,8 @@
defaults: { defaults: {
name: {value:""}, name: {value:""},
url: {value:"",required:true}, url: {value:"",required:true},
method: {value:"get",required:true} method: {value:"get",required:true},
swaggerDoc: {type:"swagger-doc", required:false}
}, },
inputs:0, inputs:0,
outputs:1, outputs:1,
@ -194,7 +199,9 @@
$("#node-input-path").html(root); $("#node-input-path").html(root);
$("#node-input-tip").show(); $("#node-input-tip").show();
} }
//document.getElementById("node-config-wsdocpath").innerHTML= if(!RED.nodes.getType("swagger-doc")){
$('.row-swagger-doc').hide();
}
} }
}); });

View File

@ -50,6 +50,7 @@ module.exports = function(RED) {
this.url = n.url; this.url = n.url;
this.method = n.method; this.method = n.method;
this.swaggerDoc = n.swaggerDoc;
var node = this; var node = this;