Download the PHP package jdesrosiers/silex-json-schema-provider without Composer
On this page you can find all versions of the php package jdesrosiers/silex-json-schema-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jdesrosiers/silex-json-schema-provider
More information about jdesrosiers/silex-json-schema-provider
Files in jdesrosiers/silex-json-schema-provider
Package silex-json-schema-provider
Short Description A Silex service provider for working with JSON Schema
License MIT
Informations about the package silex-json-schema-provider
silex-json-schema-provider
silex-json-schema-provider is a Silex service provider for working with JSON Schema.
Installation
Install the silex-json-schema-provider using composer. This project uses sematic versioning.
Parameters
- json-schema.correlationMechanism: ("profile" or "link") Defaults to "link".
- json-schema.describedBy: (string) A URI identifying the location of a schema that describes the response.
Services
- json-schema.schema-store: An instance of SchemaStore as described here https://github.com/geraintluff/jsv4-php.
- json-schema.validator: An object that exposes the Jsv4 methods described here https://github.com/geraintluff/jsv4-php.
Registering
JSON Validation
JSON Schema validation is supported by https://github.com/geraintluff/jsv4-php.
Correlation
The JSON Schema specification has two recommendations for correlating a schema to a resource. This service provider
registers after middleware that supports both. See http://json-schema.org/latest/json-schema-core.html#anchor33 for
more information on schema correlation. Set the $app["json-schema.describedBy"]
parameter to the schema that the
response should be correlated to.