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

Swagger node is taking URL phrase as parameter

Open greytexture opened this issue 8 years ago • 1 comments

Here's my one of GET requests:

GET: /students/{id}/{name} (id is number)

And now I wrote another request:

GET: /students/routeInfo/{id} But the 2nd request me following error:

Expected type is number, found type string. Which clearly means 2nd request is trying to "mask" 1st request. Which I think shouldn't be.

Taking "routeInfo" as a parameter value instead of path is absolutely weird.

Am I doing something wrong or is there any other way to handle this?

greytexture avatar Sep 05 '17 12:09 greytexture

@vikaskumar2299 have you tried changing the order of the 2 routes? List

GET: /students/routeInfo/{id} before GET: /students/routeInfo/{id} in your swagger.yaml

joshualim92 avatar Oct 09 '17 18:10 joshualim92