PHP code example of avalanche-development / swagger-caster-middleware

1. Go to this page and download the library: Download avalanche-development/swagger-caster-middleware 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/ */

    

avalanche-development / swagger-caster-middleware example snippets


$caster = new AvalancheDevelopment\SwaggerCasterMiddleware\Caster();
$result = $caster($request, $response, $next); // middleware signature

'swagger' => [
    ...,
    'params' => [
        'originalValue' => 'true',
        'type' => 'boolean',
        'value' => true,
    ],
]