2017 © Pedro Peláez
 

library zend-json-schema-validator

A ZF2 validator for justinrainbow/json-schema.

image

abacaphiliac/zend-json-schema-validator

A ZF2 validator for justinrainbow/json-schema.

  • Saturday, June 11, 2016
  • by abacaphiliac
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,410 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 23 % Grown

The README.md

Scrutinizer Code Quality Code Coverage Build Status, (*1)

abacaphiliac/zend-json-schema-validator

A ZF2 validator for justinrainbow/json-schema., (*2)

Installation

composer require abacaphiliac/zend-json-schema-validator

Usage

Use it inline:, (*3)

$validator = new \Abacaphiliac\Zend\Validator\JsonSchema(array(
  'file' => '/path/to/your/schema.json',
));
if (!$validator->isValid('{"Foo":"Bar"}')) {
    $validationMessages = $validator->getMessages();
}

Hook it up to an Apigility input-filter-spec:, (*4)

return array(
    'input_filter_specs' => array(
        'YourApi\\V1\\Rest\\YourService\\Validator' => array(
            array(
                'name' => 'YourJsonParam',
                'validators' => array(
                    array(
                        'name' => 'IntegrationConfiguration\\Validator\\JsonSchema',
                        'options' => array(
                            'file' => dirname(dirname(dirname(__DIR__))) . '/config/json-schema/IntegrationConfiguration/V1/Rest/OutboundDocumentation/configurations-config.json',
                        ),
                    ),
                )
            ),
        ),
    ),
);

Dependencies

See composer.json., (*5)

Contributing

composer update && vendor/bin/phing

This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request., (*6)

The Versions

11/06 2016

dev-master

9999999-dev

A ZF2 validator for justinrainbow/json-schema.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Timothy Younger

11/06 2016

0.1.1

0.1.1.0

A ZF2 validator for justinrainbow/json-schema.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Timothy Younger

11/06 2016

dev-json-schema-validator

dev-json-schema-validator

A ZF2 validator for justinrainbow/json-schema.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Timothy Younger

09/06 2016

0.1.0

0.1.0.0

A ZF2 validator for justinrainbow/json-schema.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Timothy Younger