Registry / networking / league-openapi-psr7-validator

league-openapi-psr7-validator

JSON →
library0.16.4phppackagistunverified

Validate PSR-7 messages against OpenAPI (3.0.2) specifications expressed in YAML or JSON.

composer require league/openapi-psr7-validator
INSTALL
IMPORT
SIG · LEAGUE-OPENAPI-PSR
L
league-openapi-psr7-validator
networkingphpv0.16.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ValidatorBuilder
use League\OpenAPIValidation\PSR7\ValidatorBuilder;

Build a validator from an OpenAPI spec file and validate a server request.

use League\OpenAPIValidation\PSR7\ValidatorBuilder; $validator = (new ValidatorBuilder)->fromYamlFile('/path/to/openapi.yaml')->getServerRequestValidator(); $validator->validate($request);
Debug
Known issues
breakingRequires PHP 7.4+ and the OpenAPI spec must be version 3.0.2 exactly.
fix
Ensure your PHP version is 7.4 or higher and your spec file is OpenAPI 3.0.2.
affects: >=0.16.0
Upgrade
Version history
0.16.4latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
league-openapi-psr7-validator — pip install league-openapi-psr7-validator · libregistry