Download the PHP package slack/hack-json-schema without Composer

On this page you can find all versions of the php package slack/hack-json-schema. 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 hack-json-schema

Hack JSON Schema

Build Status

Hack JSON Schema is a library for validating JSON inputs, using JSON schemas, in Hack.

Given a JSON schema file, you can generate a validator in Hack to validate incoming JSON against the schema. If the JSON conforms to the schema, the validator will returned typed output.

There are several benefits to generation:

Usage

Codegen::forPath

The most basic way to use this library is to generate a validator from a JSON schema file:

/path/to/MyJsonSchemaValidator.php now exists with a class:

Each validator has a validate method, which takes a decoded JSON object:

Codegen::forPaths

If you have multiple JSON schemas that leverage the $ref attribute, you should prefer to use Codegen::forPaths over Codegen::forPath.

The workflow for Codegen::forPath is:

This works well if you only have one primary schema, but if you have multiple schemas, each with common refs, you'll start to generate a lot of duplicate code.

In these cases, you can use Codegen::forPaths.

By defining the source_root and output_root we can generate unique validators per $ref we come across. We can then re-use those validators when generating other validators.

Developing

Installing Dependencies

We handle all dependencies through Docker. It's as simple as:

Running Tests

Related Libraries

This library was inspired by the ideas in these related libraries:

License

Hack JSON Schema is MIT-licensed.


All versions of hack-json-schema with dependencies

PHP Build Version
Package Version
Requires facebook/hack-codegen Version ^4.1.0
hhvm/hsl Version ^4.0.1
hhvm/type-assert Version ^4.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 slack/hack-json-schema contains the following files

Loading the files please wait ....