koharakazuya / laravel-openapi-validator-middleware
Laravel middleware validates requests and responses by an OpenAPI specification document
v0.1.0
2019-01-25 03:48 UTC
Requires
- php: ^7.1
- hkarlstrom/openapi-validation-middleware: ^0.2.3
- koharakazuya/laravel-psr15-middleware: ^0.1.0
This package is auto-updated.
Last update: 2025-03-26 22:28:34 UTC
README
Laravel middleware validates requests and responses by an OpenAPI specification document.
Installation
$ composer require koharakazuya/laravel-openapi-validator-middleware $ php artisan vendor:publish --provider="KoharaKazuya\LaravelOpenAPIValidatorMiddleware\LaravelOpenAPIValidatorMiddlewareServiceProvider"
Usage
Modify configurations in config/laravelopenapivalidatormiddleware.php
.
Append a middleware to app/Http/Kernel.php
.
protected $middleware = [
// other middlewares...
+ \KoharaKazuya\LaravelOpenAPIValidatorMiddleware\LaravelOpenAPIValidatorMiddleware::class,
];