Download the PHP package soyuka/json-schema-bundle without Composer

On this page you can find all versions of the php package soyuka/json-schema-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package json-schema-bundle

Json-schema bundle

Build Status SensioLabsInsight

Based on a fork of https://github.com/HadesArchitect/JsonSchemaBundle

Features

Installation

Composer:

Load the bundle:

Json Schema generation

The default is to parse files located in every Entity directory of every Bundle. The default strategy uses php to parse your class (see php-to-json-schema).

If you want to parse another directory, just specify it through the --directory option:

If you want to use Doctrine annotation to generate a json schema, specify the doctrine strategy. Note that the doctrine/orm-bundle will be needed:

Every json schema will be written to the configurable directory of your choice by keeping the following tree architecture:

The default value is %kernel.root_dir%/Resources/validators, so assuming the Entity parsed is in AcmeBundle/Entity/Product, the schema will be written in %kernel.root_dir%/Resources/validators/AcmeBundle/Product.json.

Validation annotation

This bundle adds a JsonSchema class annotation. When no option is given, the validator will look in the json path (same architecture than with schema generation).

The most basic example will be:

See here for the full class.

If you want to use a json schema at a different location, or even remote, specify the path of your choice:

The schema option value is retrieved using the JsonSchema\Uri\UriRetriever (any value that works there works in the annotation).

Configuration

Translations

Translation domain is JsonSchemaViolations, therefore default translations would be located in:

Every translation will be given following string parameters:

Keys are the constraint code, for example with minLength:

Hack

If you want to handle JsonSchema validation yourself, but have issues using Entity instances with justinrainbow/json-schema, you may want to take a look at the PropertyAccessorConstraint. Here, it'll override the ObjectConstraint so that object properties are accessed through the PropertyAccessor. See the Validator class.

Licence


All versions of json-schema-bundle with dependencies

PHP Build Version
Package Version
Requires justinrainbow/json-schema Version <2
soyuka/php-to-json-schema Version ~1.0.1
symfony/framework-bundle Version ^3.0
symfony/validator Version ^3.0
symfony/property-access Version ^3.0
symfony/finder Version ^3.0
symfony/property-info Version ^3.0
symfony/console Version ^3.0
psr/cache Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package soyuka/json-schema-bundle contains the following files

Loading the files please wait ....