How to work with mulitple annotation folder in latest version of darkaonline/l5-swagger?

948 Views Asked by At

It was working perfectly with multiple annotation folders in laravel 8.0, forgot the minor version of l5-swagger. Later when I do composer update and darkoline get updated to ^8.3 version. Now, its trying to make documentation(#SchemaRef) out of each file stored inside the folder. I do have following configuration

/*
* Absolute paths to directory containing the swagger annotations are stored.
*/
annotations' => [
   base_path('app'),
   base_path('Modules'),
]

In my case I do have following error

 ErrorException 
 Skipping unknown \CreateRolesTable

Here CretaetRolesTable is a migration file inside Modules folder, no swagger related annotation exists in CreateRolesTable file and neither this name is being used as #ref.

1

There are 1 best solutions below

1
Saman On

You should use the anonymous function in CreateRolesTable file.

return new class extends Migration

For more information check the official documentation.(see more)