Skip to content

Commit 872363d

Browse files
authored
Merge pull request #75 from Konafets/readme-update
Change Generator to ModelGenerator in Readme
2 parents 42454eb + e972250 commit 872363d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ To avoid adding all dependencies of the php-json-schema-model-generator to your
4444

4545
Check out the [docs](https://php-json-schema-model-generator.readthedocs.io/en/latest/) for more details.
4646

47-
The base object for generating models is the *Generator*. After you have created a Generator you can use the object to generate your model classes without any further configuration:
47+
The base object for generating models is the *ModelGenerator*. After you have created a Generator you can use the object to generate your model classes without any further configuration:
4848

4949
```php
50-
(new Generator())
50+
(new ModelGenerator())
5151
->generateModels(new RecursiveDirectoryProvider(__DIR__ . '/schema'), __DIR__ . '/result');
5252
```
5353
The first parameter of the *generateModels* method must be a class implementing the *SchemaProviderInterface*. The provider fetches the JSON schema files and provides them for the generator. The following providers are available:
@@ -62,7 +62,7 @@ The second parameter must point to an existing and empty directory (you may use
6262
As an optional parameter you can set up a *GeneratorConfiguration* object (check out the docs for all available options) to configure your Generator and/or use the method *generateModelDirectory* to generate your model directory (will generate the directory if it doesn't exist; if it exists, all contained files and folders will be removed for a clean generation process):
6363

6464
```php
65-
$generator = new Generator(
65+
$generator = new ModelGenerator(
6666
(new GeneratorConfiguration())
6767
->setNamespacePrefix('MyApp\Model')
6868
->setImmutable(false)

0 commit comments

Comments
 (0)