Skip to content

Commit f1ddf95

Browse files
committed
improve readme
1 parent f56ab30 commit f1ddf95

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@ You can also adjust file templates according to your needs.
3535

3636
### 'enums' => EnumsGenerator::class
3737

38-
Generates Enum class for each enum listed in `oas3->components->schemas`.
38+
Generates Enum class only for enums listed in `oas3->components->schemas`.
3939
Your need to specify `x-enum-varnames` field in each enum schema. The values are used as enum constants' names.
4040
Destination directory is cleared before generation to make sure all unused enum classes are deleted.
41+
Enums generator does NOT support `allOf`, `anyOf` and `oneOf` at the moment.
4142

4243
### 'routes' => RoutesGenerator::class
4344

4445
Generates laravel route file (`route.php`) for each endpoint in `oas3->paths`
4546
The following [extension properties](https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#specificationExtensions) are used by this generator:
4647

4748
```
48-
x-lg-handler: '\App\Http\ApiV1\Modules\Customers\Controllers\CustomersController@create' // Optional. Path is ignored if this field is empty. You can use :: instead of @ if you want
49+
x-lg-handler: '\App\Http\Controllers\CustomersController@create' // Optional. Path is ignored if this field is empty. You can use :: instead of @ if you want
4950
x-lg-route-name: 'createCustomer' // Optional. Translates to `->name('createCustomer')`
5051
x-lg-middleware: 'auth,web' // Optional. Translates to `->middleware(['auth', 'web'])`
5152
```
@@ -55,7 +56,7 @@ You should include it in your main route file like that:
5556

5657
```php
5758
$generatedRoutes = __DIR__ . "/OpenApiGenerated/routes.php";
58-
if (file_exists($generatedRoutes)) { // prevents your app and artisan from breaking if there is no autogenerated rout file for some reason.
59+
if (file_exists($generatedRoutes)) { // prevents your app and artisan from breaking if there is no autogenerated route file for some reason.
5960
require $generatedRoutes;
6061
}
6162
```

0 commit comments

Comments
 (0)