diff --git a/src/Faker.php b/src/Faker.php index c067586..517d435 100644 --- a/src/Faker.php +++ b/src/Faker.php @@ -72,6 +72,10 @@ public function generate($schema, \stdClass $parentSchema = null, string $schema return Base::randomElement($schema->enum); } + if (isset($schema->const)) { + return Base::randomElement([$schema->const]); + } + if (! isset($this->fakers[$type])) { throw new UnsupportedTypeException($type); }