PHP code example of basster / silex-simple-swagger-provider
1. Go to this page and download the library: Download basster/silex-simple-swagger-provider 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/ */
basster / silex-simple-swagger-provider example snippets
$app->register(new Basster\Silex\Provider\Swagger\SwaggerProvider(), [
"swagger.servicePath" => __DIR__ . "/path/to/your/api",
]);
$app["swagger.cache"] = [
"max_age": "432000", // 5 days in seconds
"s_maxage": "432000", // 5 days in seconds
"public": true,
]