PHPackages                             luca-rath/php-json-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. luca-rath/php-json-schema

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

luca-rath/php-json-schema
=========================

PHP classes to help create json schemas

00[1 PRs](https://github.com/luca-rath/php-json-schema/pulls)PHP

Since Dec 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/luca-rath/php-json-schema)[ Packagist](https://packagist.org/packages/luca-rath/php-json-schema)[ RSS](/packages/luca-rath-php-json-schema/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP JSON Schema
===============

[](#php-json-schema)

[![License](https://camo.githubusercontent.com/c05d2845bd795f1dd0e9d0cd05e63abe82314e47e629b5d108acef2edbe8fe8a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c7563612d726174682f7068702d6a736f6e2d736368656d61)](LICENSE)[![Latest tag](https://camo.githubusercontent.com/be635d30e85c2645e81f23114f8f42e79a3905308046f85cce54b3cd80495fe3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6c7563612d726174682f7068702d6a736f6e2d736368656d613f736f72743d73656d766572)](https://github.com/luca-rath/php-json-schema/releases)[![GitHub Actions](https://camo.githubusercontent.com/51e5c47e48d77aaeeadb5f5b49dc3e57e6fbd5659f9b2d937ca98022dfc4c684/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6c7563612d726174682f7068702d6a736f6e2d736368656d612f54657374733f6c6162656c3d676974687562253230616374696f6e73)](https://github.com/luca-rath/php-json-schema/actions?query=workflow%3Atests)[![Scrutinizer build](https://camo.githubusercontent.com/1280c258ab50096f3f05e5eed94a0134f532f5f3097d28a7c3d4a1fb57cc5a55/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f6c7563612d726174682f7068702d6a736f6e2d736368656d612f6d61696e3f6c6162656c3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/luca-rath/php-json-schema/build-status/main)[![Scrutinizer coverage](https://camo.githubusercontent.com/f63450925203f885cccc0f405b6a9e7d8f25d745ab7a644c8e9fd5afa3e43ee3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c7563612d726174682f7068702d6a736f6e2d736368656d612f6d61696e3f6c6162656c3d636f6465253230636f766572616765)](https://scrutinizer-ci.com/g/luca-rath/php-json-schema/?branch=main)[![Scrutinizer code quality](https://camo.githubusercontent.com/ebc62a65fad49a5a4ed966386d82692b8e2fcded2cdba3a86f1c05c3041ad239/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6c7563612d726174682f7068702d6a736f6e2d736368656d612f6d61696e)](https://scrutinizer-ci.com/g/luca-rath/php-json-schema/?branch=main)

PHP classes to help create json schemas

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

[](#installation)

```
composer require luca-rath/php-json-schema
```

Usage
-----

[](#usage)

```
use JsonSchema\Keyword\FormatKeyword;
use JsonSchema\Property\Property;
use JsonSchema\Schema\IntegerSchema;
use JsonSchema\Schema\ObjectSchema;
use JsonSchema\Schema\StringSchema;

ObjectSchema::create()
    ->title('Registration form')
    ->properties([
        Property::create('email', true, StringSchema::create()
            ->format(FormatKeyword::FORMAT_EMAIL)
            ->examples(['admin@example.org'])),
        Property::create('password', true, StringSchema::create()
            ->minLength(8)
            ->description('The password must be at least eight characters long')),
        Property::create('age', false, IntegerSchema::create()
            ->nullable()
            ->minimum(18)),
    ]);
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5758674?v=4)[Luca Rath-Heel](/maintainers/luca-rath)[@luca-rath](https://github.com/luca-rath)

---

Top Contributors

[![luca-rath](https://avatars.githubusercontent.com/u/5758674?v=4)](https://github.com/luca-rath "luca-rath (11 commits)")

### Embed Badge

![Health badge](/badges/luca-rath-php-json-schema/health.svg)

```
[![Health](https://phpackages.com/badges/luca-rath-php-json-schema/health.svg)](https://phpackages.com/packages/luca-rath-php-json-schema)
```

###  Alternatives

[bestnetwork/telnet

Telnet client in php

2428.6k](/packages/bestnetwork-telnet)[bigecko/laravel-theme

Simple theme manager for Laravel 4.

336.9k](/packages/bigecko-laravel-theme)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
