Open API & Swagger

One of the reasons Tina4 exists is to lift the tedium of creating those nice Swagger UI documents. Tina4 has opted for an annotation mechanism to describe the API end points.

It is good practice to annotate your code for future purposes. For example, if someone else were to look at your code.

Below is an example of a simple Swagger annotation added to a Class function.


<?php
/**
* @description My first API
* @summary Returns list of cars
* @tags Cars
*/

Powered by ComboStrap