PHP code example of koriym / json-schema-faker
1. Go to this page and download the library: Download koriym/json-schema-faker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
koriym / json-schema-faker example snippets
$schema = json_decode(file_get_contents(__DIR__ . '/schema.json'));
$fake = (new Faker)->generate($schema);
// pass SplFileInfo to support local $ref schema file
$fake = (new Faker)->generate(new SplFileInfo(__DIR__ . '/schema.json'));