1. Go to this page and download the library: Download icymat/apidoc library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
icymat / apidoc example snippets
namespace App\Controller;
...
use IcyMat\ApiDoc\Annotation\ApiMethod;
use IcyMat\ApiDoc\Annotation\ApiRoute;
use IcyMat\ApiDoc\Annotation\ApiDescription;
use IcyMat\ApiDoc\Annotation\ApiParams;
use IcyMat\ApiDoc\Annotation\ApiResponse;
class NotesController extends Controller
{
/**
* @ApiMethod(method="PUT")
* @ApiRoute(name="/notes/{id}/save")
* @ApiParams(name="title", type="string", nullable=false, me="pattern", type="string", nullable=true, w JsonResponse(['status' => 'error', 'code' => 'notes_01', 'message' => 'Access denied'], 403);
}
$notesManager->saveNoteFromRequest($note, $request);
return new JsonResponse(['status' => 'success']);
}
}