packagedby / openapi-testing-helpers
There is no license information available for the latest version (1.0.0) of this package.
A small library to validate an OpenAPI specification from Laravel feature tests
1.0.0
2021-03-19 14:02 UTC
Requires
- php: ^7.3|^7.4|^8.0
- laravel/framework: ^7.0|^8.0
- osteel/openapi-httpfoundation-testing: ^0.3.0
This package is auto-updated.
Last update: 2025-03-11 18:50:54 UTC
README
This library is a small trait which wraps around the osteel/openapi-httpfoundation-testing library.
Usage
You can use the OpenApiValidation
trait in an abstract class.
This makes the validateOpenApiSpec
method available to classes extending the base class.
<?php namespace Tests\Feature; use PackagedBy\OpenApiTestingHelpers\OpenApiValidation; use Tests\TestCase; abstract class AbstractFeatureTest extends TestCase { use OpenApiValidation; protected string $openApiSpecPath; protected function setUp(): void { parent::setUp(); $this->openApiSpecPath = base_path('/path_to_spec/openapi.yaml'); } }