1. Go to this page and download the library: Download webman-tech/swagger 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/ */
webman-tech / swagger example snippets
namespace app\swagger;
use OpenApi\Annotations as OA;
/**
* @link https://swagger.io/specification/#info-object
* @OA\OpenApi(
* @OA\Info(version="1.0.0", title="My App"),
* @OA\Server(url="/api", description="localhost"),
* )
*/
class OpenapiSpec
{
}