PHP code example of terwey / slim-swagger

1. Go to this page and download the library: Download terwey/slim-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/ */

    

terwey / slim-swagger example snippets


$app->add(new \terwey\SlimSwagger(array(), array('baseDir' => __DIR__.'/../src/')));

$swaggerSettings = array(
    'output' => 'json',
    'apiVersion' => $defaultApiVersion,
    'swaggerVersion' => $defaultSwaggerVersion,
    'defaultSwaggerVersion' => $resourceList['swaggerVersion'],
    'defaultBasePath' => $defaultBasePath
);

$options = array(
    'baseDir' => __DIR__.'/../',
    'ignoreDir' => array()
);