PHPackages                             krak/schema - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. krak/schema

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

krak/schema
===========

Declarative API for Defining and Processing Schemas

v0.2.0(6y ago)19.1k2[1 PRs](https://github.com/krakphp/schema/pulls)1MITPHPPHP ^7.1

Since Mar 22Pushed 3y ago3 watchersCompare

[ Source](https://github.com/krakphp/schema)[ Packagist](https://packagist.org/packages/krak/schema)[ RSS](/packages/krak-schema/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (1)

Schema
======

[](#schema)

The schema library provides the ability to define schemas with a declarative API and in turn using any of the processors to act on that schema.

We separate the concepts of the schema definition and the processors to allow us to build an AST describing a schema, and then allow different processors handle that structure for things like validation, generate a symfony config tree, building valid json schema, etc etc.

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

[](#installation)

Install with composer at `krak/schema`

Usage
-----

[](#usage)

### Defining a Schema

[](#defining-a-schema)

```
