PHPackages                             wwwision/types-jsonschema - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. wwwision/types-jsonschema

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

wwwision/types-jsonschema
=========================

Generator for JSON Schema files from PHP classes, see https://json-schema.org/

2.1.0(9mo ago)18.4k[1 issues](https://github.com/bwaidelich/types-jsonschema/issues)1MITPHPPHP &gt;=8.1CI passing

Since Feb 29Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/bwaidelich/types-jsonschema)[ Packagist](https://packagist.org/packages/wwwision/types-jsonschema)[ GitHub Sponsors](https://github.com/sponsors/bwaidelich)[ Fund](https://www.paypal.me/bwaidelich)[ RSS](/packages/wwwision-types-jsonschema/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (7)Versions (7)Used By (1)

types-jsonschema
================

[](#types-jsonschema)

Integration for the [wwwision/types](https://github.com/bwaidelich/types) package that allows to generate [JSON Schema](https://json-schema.org/) files from PHP code

Usage
-----

[](#usage)

This package can be installed via [composer](https://getcomposer.org):

```
composer require wwwision/types-jsonschema
```

With that, you can create JSON Schema from PHP classes:

```
class Contact {
    public function __construct(public string $name, public int $age) {}
}

$schema = (new JsonSchemaGenerator())->fromClass(Contact::class);

$expected = fromClass(Contact::class);

$expected = withMiddleware($middleware);
$schema = (new JsonSchemaGenerator($options))->fromClass(Contact::class);

assert($middleware->log === ['Contact', 'HonorificTitle', 'FullName', 'GivenName', 'FamilyName', 'boolean']);
```

Contribution
------------

[](#contribution)

Contributions in the form of [issues](https://github.com/bwaidelich/types-jsonschema/issues) or [pull requests](https://github.com/bwaidelich/types-jsonschema/pulls) are highly appreciated

License
-------

[](#license)

See [LICENSE](./LICENSE)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~105 days

Recently: every ~52 days

Total

6

Last Release

284d ago

Major Versions

1.2.0 → 2.0.02025-04-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/307571?v=4)[Bastian Waidelich](/maintainers/bwaidelich)[@bwaidelich](https://github.com/bwaidelich)

---

Top Contributors

[![bwaidelich](https://avatars.githubusercontent.com/u/307571?v=4)](https://github.com/bwaidelich "bwaidelich (28 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wwwision-types-jsonschema/health.svg)

```
[![Health](https://phpackages.com/badges/wwwision-types-jsonschema/health.svg)](https://phpackages.com/packages/wwwision-types-jsonschema)
```

###  Alternatives

[driftingly/rector-laravel

Rector upgrades rules for Laravel Framework

1.2k12.0M462](/packages/driftingly-rector-laravel)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[veewee/xml

XML without worries

1835.9M29](/packages/veewee-xml)[laminas/laminas-hydrator

Serialize objects to arrays, and vice versa

12916.8M147](/packages/laminas-laminas-hydrator)[mck89/peast

Peast is PHP library that generates AST for JavaScript code

18934.7M29](/packages/mck89-peast)

PHPackages © 2026

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