p0n0marev/laravel-openapi-validate

OpenAPI API testing in Laravel projects.

Installs: 870

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 1

Open Issues: 0

pkg:composer/p0n0marev/laravel-openapi-validate

0.0.4 2021-08-13 08:26 UTC

This package is auto-updated.

Last update: 2025-10-13 17:27:15 UTC


README

OpenAPI API testing in Laravel projects.

Instalation

composer require p0n0marev/laravel-openapi-validate --dev

Use

<?php

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( '/', []);
    }
}