So everyone is building APIs now – parsing and outputting JSON is not that hard. Some people even build truly RESTful APIs, or something not to far from that.
Before, when building APIs was about SOAP with XML schemas and WSDL specifications, people spent so much time building their APIs that they had the time to think. Now, building an API is so easy and fast that the documentation is often suffering. Either because not much documentation is written in the first place, or because the API is evolving and nobody takes the time to update the documentation.
Swagger is a popular project providing auto generated API docs based on a service specification. This spec is based on annotation comments in the controllers and models, giving the developer a fairly easy, and close to the code way of keeping the API docs up to date.
In this two-part article on Swagger I will try to cover what you need to get your API docs up and running with Swagger + Swagger UI in ZF2. (more…)