OpenAPI Schema to JSON Schema Converter
![Software License][ico-license]
![Coverage Status][ico-scrutinizer]
![Total Downloads][ico-downloads], (*1)
This package provides a wrapper around JSON Guard, allowing you to get a ProblemDetails object representing any errors with the data being validated., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require hskrasek/jsonschema-input-validator, (*4)
## Usage
``` php
<?php
use HSkrasek\JSONSchema\Validator;
$validator = new Validator($data, $schema);
if ($validator->fails()) {
$problemDetails = $validator->getProblemDetails();
// Render problem details somehow
return json_encode($problemDetails);
}
Change log
Please see CHANGELOG for more information on what has changed recently., (*5)
Testing
bash
$ composer test, (*6)
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details., (*7)
Security
If you discover any security related issues, please email hunterskrasek@me.com instead of using the issue tracker., (*8)
Credits
License
The MIT License (MIT). Please see License File for more information., (*9)