Now let's focus more on documentation and testing with a well-known tool: Swagger. This is a tool that's meant to help you design, model, and test APIs. The key idea is that you'll end up by having an online, interactive document that will describe in detail all of your API calls, the parameter types and restrictions, the required and optional values, and so on, even letting you try calls on the fly to better understand how the API is meant to be used.
Documenting and testing your REST API with Swagger
How to do it...
The first—and hardest!—part of setting up Swagger is preparing the specification for your complete API. This is meant to be written in YAML Ain't Markup Language (YAML), and...