node-red-node-swagger icon indicating copy to clipboard operation
node-red-node-swagger copied to clipboard

Using parameters from the path

Open sergekeyser opened this issue 9 years ago • 1 comments

Hi First of all I would like to compliment you with the swagger plugin, great tool simple to use and worked in one go.

On thing I did not see... (maybe something that could be added?)

When I have a url like this: /pet/{petId}/name which allows me to modify the name of a pet based on its id then I would normally specify this like so:

"parameters":[
{
"name":"petId", "in":"path", "description":"ID of pet to return", "required":true, "type":"integer", "format":"int64" }

When I look in the node-red editor the options for parameter are: *query *header *formdata *body

Any way you could add to that the "path" ?

sergekeyser avatar Jul 27 '16 15:07 sergekeyser

Okay... after some digging in the code and googeling I found this: https://github.com/node-red/node-red-node-swagger/issues/2

Basically when an http node has a parameter like /pet/:petId/ it automatically (after deploying) converts into a parameter. (tried this out and it is working so I am a happy camper :-D)

Maybe worth adding this to the README.md? could not find it there...

sergekeyser avatar Jul 27 '16 15:07 sergekeyser