You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,17 +35,18 @@ You can also adjust file templates according to your needs.
35
35
36
36
### 'enums' => EnumsGenerator::class
37
37
38
-
Generates Enum class for each enum listed in `oas3->components->schemas`.
38
+
Generates Enum class only for enums listed in `oas3->components->schemas`.
39
39
Your need to specify `x-enum-varnames` field in each enum schema. The values are used as enum constants' names.
40
40
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.
41
42
42
43
### 'routes' => RoutesGenerator::class
43
44
44
45
Generates laravel route file (`route.php`) for each endpoint in `oas3->paths`
45
46
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:
46
47
47
48
```
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
49
50
x-lg-route-name: 'createCustomer' // Optional. Translates to `->name('createCustomer')`
50
51
x-lg-middleware: 'auth,web' // Optional. Translates to `->middleware(['auth', 'web'])`
51
52
```
@@ -55,7 +56,7 @@ You should include it in your main route file like that:
0 commit comments