So it happened I started this project with friend of mine, a new app to launch on the mobile market. I offered to write the server-side, a simple web API. Once he got my code he immediately asked me "Sam how do I know the routes and so on?! Write a documentation or something!". And then... Swagger came up.
I presume many of you encountered this situation before or will in the future, a developer may write the best web API service but without proper documentation how can other developers discover and use it? So in this tutorial I want to introduce Swagger, a famous open-source framework to help you write RESTful APIs.
Swagger editor is an elegant browser-based editor which really simplifies our efforts to develop a web API. In particular, it provides:
On Scotch.io there is a cool tutorial to authenticate a node.js API with JSON web tokens. Why don't you try to rewrite with swagger to practice with header parameters?
Last but not the least, I remind you again to take a look a the documentation on the official website for a deeper understanding of Swagger.