PHPackages                             bcastellano/json-schema-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. bcastellano/json-schema-bundle

ActiveSymfony-bundle[API Development](/categories/api)

bcastellano/json-schema-bundle
==============================

Symfony bundle to validate json api request and responses with json-schema

v1.0.1(9y ago)037MITPHPPHP &gt;=5.5

Since Nov 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bcastellano/json-schema-bundle)[ Packagist](https://packagist.org/packages/bcastellano/json-schema-bundle)[ RSS](/packages/bcastellano-json-schema-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (10)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/a70c57b7273dbf510bce9d62ed5d7be25c5fa0334cbe9aff975431c7f99bb852/68747470733a2f2f7472617669732d63692e6f72672f6263617374656c6c616e6f2f6a736f6e2d736368656d612d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bcastellano/json-schema-bundle)[![Coverage Status](https://camo.githubusercontent.com/1c118c62279cf7be65047506e95131b1696204a5cbd299de592bb5fe6368738b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6263617374656c6c616e6f2f6a736f6e2d736368656d612d62756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/bcastellano/json-schema-bundle?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/e92c316aae63f398e5eb365f90f2f23ed20601aca56abf6eae46ad2317fd6a6c/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f31323931343033362d626664622d346261312d623839612d3966303733336530613761332f6d696e692e706e67)](https://insight.sensiolabs.com/projects/12914036-bfdb-4ba1-b89a-9f0733e0a7a3)[![License](https://camo.githubusercontent.com/e498eead712d82d9ee1af0a4850acd2e46ea48c48fb9ce5a3d2ab64f28f95b34/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6d69742d626c75652e737667)](http://doge.mit-license.org)

Json-Schema Bundle
==================

[](#json-schema-bundle)

Symfony bundle to validate json api requests and responses based on [JSON Schema](http://json-schema.org) specification.

It auto validates Requests and Responses for an API with json-schema files that can be auto generated from json body.

JSON Schema is described in its specification as:

> JSON Schema is a JSON media type for defining the structure of JSON data. JSON Schema provides a contract for what JSON data is required for a given application and how to interact with it. JSON Schema is intended to define validation, documentation, hyperlink navigation, and interaction control of JSON data.

Features
--------

[](#features)

- Json Schema service for validate jsons
- Listener to auto validate request and responses
- Json Schema file generation from json body (request and responses content)

Installation
------------

[](#installation)

Composer:

```
composer require bcastellano/json-schema-bundle
```

Load the bundle:

```
