PHP code example of p0n0marev / laravel-openapi-validate
1. Go to this page and download the library: Download p0n0marev/laravel-openapi-validate 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/ */
p0n0marev / laravel-openapi-validate example snippets
namespace Tests\Api\Mobile;
use Tests\TestCase;
use Tests\Api\Mobile\OpenApiSchemaValidate;
class ApiTest extends TestCase
{
use OpenApiSchemaValidate;
public function setUp()
{
parent::setUp();
$this->buildResponseValidatorFromJson(file_get_contents('open-api.json'));
}
public function testIndex()
{
$this->get( '/', []);
}
}