PHPackages                             emanueleminotto/json-schema-faker - 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. emanueleminotto/json-schema-faker

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

emanueleminotto/json-schema-faker
=================================

Faker provider for JSON Schema

1.0.0(6y ago)0261[1 PRs](https://github.com/EmanueleMinotto/json-schema-faker/pulls)MITPHPPHP ~7.1

Since Jul 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/EmanueleMinotto/json-schema-faker)[ Packagist](https://packagist.org/packages/emanueleminotto/json-schema-faker)[ RSS](/packages/emanueleminotto-json-schema-faker/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

JSON Schema Faker
=================

[](#json-schema-faker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fa011996a13d102491f51f1953cd9b346da2edb329912643e00a2900603e0171/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d616e75656c656d696e6f74746f2f6a736f6e2d736368656d612d66616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emanueleminotto/json-schema-faker)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/67636d1a69598f223f359837312ba836af0b35a0d73b294dccfb838b3d90474f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f456d616e75656c654d696e6f74746f2f6a736f6e2d736368656d612d66616b65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/EmanueleMinotto/json-schema-faker)[![Coverage Status](https://camo.githubusercontent.com/7afe538993ad3e4545db00bce3e84f5a02d4e6ea8a980a4a9e900a9437420631/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f456d616e75656c654d696e6f74746f2f6a736f6e2d736368656d612d66616b65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/EmanueleMinotto/json-schema-faker/code-structure)[![Quality Score](https://camo.githubusercontent.com/0c5b5e3c8be3f5c41ae0c748ef6c45999fa7450353de958ee79ce03538b85fb4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f456d616e75656c654d696e6f74746f2f6a736f6e2d736368656d612d66616b65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/EmanueleMinotto/json-schema-faker)[![Total Downloads](https://camo.githubusercontent.com/e21040459a60eb04ffc341c35977674689a67df6cc8b79bcad60851971c5d1ab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d616e75656c656d696e6f74746f2f6a736f6e2d736368656d612d66616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emanueleminotto/json-schema-faker)

Utility based on [fzaninotto/Faker](https://github.com/fzaninotto/Faker) to generate fake JSON starting from a JSON Schema.

Structure
---------

[](#structure)

If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.

```
bin/
config/
src/
tests/
vendor/

```

Install
-------

[](#install)

Via Composer

```
$ composer require emanueleminotto/json-schema-faker
```

Usage
-----

[](#usage)

```
$faker = Faker\Factory::create();
$faker->addProvider(new EmanueleMinotto\JsonSchemaFaker\JsonSchemaProvider());

$schema = '{
  "type": "array",
  "items": [
    {"type": "integer"},
    {"type": "string"}
  ]
}';
$data = $faker->jsonSchemaContent($schema);
// $data = $faker->jsonSchema(json_decode($schema, true));

var_dump($data);
/*
array(2) {
  [0]=>
  int(2336562738116576768)
  [1]=>
  string(62) "Officiis qui officiis quasi. Sed et dolorem omnis repellendus."
}
*/
```

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Emanuele Minotto](https://github.com/EmanueleMinotto)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

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

Unknown

Total

1

Last Release

2504d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/30b6fbd038f22a54716027eb7ce30c6cafd8e59c138ae58b3c2516c34ccfef7f?d=identicon)[EmanueleMinotto](/maintainers/EmanueleMinotto)

---

Top Contributors

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

---

Tags

jsonschemafaker

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/emanueleminotto-json-schema-faker/health.svg)

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

###  Alternatives

[justinrainbow/json-schema

A library to validate a json schema.

3.6k316.9M612](/packages/justinrainbow-json-schema)[hasbridge/json-schema-validator

PHP 5.3 implementation of json schema validation

123456.3k2](/packages/hasbridge-json-schema-validator)[psx/schema

Parse and generate data schema formats

57238.7k18](/packages/psx-schema)

PHPackages © 2026

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