A Freelance DevOps doing container stuff and automating unhealthy amounts of software.
Need something automated or containerized? Feel free to hit me up :)
As far as I know, swagger implements {} as template delimiters, not colons, but I'm not using node a lot (yet), so maybe I am missing something here.
I can't find any information in the swagger-docs that mention the colon-style, so input from @kabartolo
would be great here :)
GET /users/:id doesn't work for me. I change it to GET /users/{id}, which works.
In the api-docs, once I input id number and click execute, here is the difference:
/users/{id}
curl -X GET "localhost:3000/users/1" -H "accept: application/json"
/users/:id
curl -X GET "localhost:3000/users/:id" -H "accept: application/json"
Good find! And also, welcome to DEV :)
As far as I know, swagger implements {} as template delimiters, not colons, but I'm not using node a lot (yet), so maybe I am missing something here.
I can't find any information in the swagger-docs that mention the colon-style, so input from @kabartolo would be great here :)
Hi Shuwen!
I'm really glad you pointed this out because it's totally a bug. I'm not sure why I thought
:id
worked, but you're right that it doesn't.I'll update the tutorial and sample project. Thank you!
Hi Kate, Thank you your article to help me setting up my swagger documentation. One of the best article I find and I've recommend it to my coworkers.
Thank you so much! I'm happy it was helpful