I use knuckleswtf/scribe package in my laravel apps to auto generate api docs from routes.
in one of laravel apps when I execute php artisan scribe:generate
i get following error:
Spatie\DataTransferObject\DataTransferObjectError
Public properties `auth`, `controller`, `method`, `route` not found on Knuckles\Camel\Output\OutputEndpointData
at vendor/spatie/data-transfer-object/src/DataTransferObjectError.php:15
11▕ public static function unknownProperties(array $properties, string $className): DataTransferObjectError
12▕ {
13▕ $propertyNames = implode('`, `', $properties);
14▕
➜ 15▕ return new self("Public properties `{$propertyNames}` not found on {$className}");
16▕ }
17▕
18▕ public static function invalidTypes(array $invalidTypes): DataTransferObjectError
19▕ {
1 vendor/spatie/data-transfer-object/src/DataTransferObject.php:89
Spatie\DataTransferObject\DataTransferObjectError::unknownProperties()
2 vendor/knuckleswtf/scribe/camel/Output/OutputEndpointData.php:103
Spatie\DataTransferObject\DataTransferObject::__construct()
3 vendor/knuckleswtf/scribe/camel/BaseDTO.php:29
Knuckles\Camel\Output\OutputEndpointData::__construct()
4 vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php:182
Knuckles\Camel\BaseDTO::create()
5 vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php:126
Knuckles\Scribe\GroupedEndpoints\GroupedEndpointsFromApp::mergeAnyEndpointDataUpdates()
6 vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php:71
Knuckles\Scribe\GroupedEndpoints\GroupedEndpointsFromApp::extractEndpointsInfoFromLaravelApp()
7 vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php:49
Knuckles\Scribe\GroupedEndpoints\GroupedEndpointsFromApp::extractEndpointsInfoAndWriteToDisk()
8 vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php:51
Knuckles\Scribe\GroupedEndpoints\GroupedEndpointsFromApp::get()
9 vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
Knuckles\Scribe\Commands\GenerateDocumentation::handle()
10 vendor/laravel/framework/src/Illuminate/Container/Util.php:40
Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
11 vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
Illuminate\Container\Util::unwrapIfClosure()
12 vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
Illuminate\Container\BoundMethod::callBoundMethod()
13 vendor/laravel/framework/src/Illuminate/Container/Container.php:653
Illuminate\Container\BoundMethod::call()
14 vendor/laravel/framework/src/Illuminate/Console/Command.php:136
Illuminate\Container\Container::call()
15 vendor/symfony/console/Command/Command.php:298
Illuminate\Console\Command::execute()
16 vendor/laravel/framework/src/Illuminate/Console/Command.php:121
Symfony\Component\Console\Command\Command::run()
17 vendor/symfony/console/Application.php:1024
Illuminate\Console\Command::run()
18 vendor/symfony/console/Application.php:299
Symfony\Component\Console\Application::doRunCommand()
19 vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application::doRun()
20 vendor/laravel/framework/src/Illuminate/Console/Application.php:94
Symfony\Component\Console\Application::run()
21 vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:129
Illuminate\Console\Application::run()
22 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
I tried to use different route file or controller. even commented out all routes and just left one anonymous route. the only way it works, is that no routes are in my app. which gives these logs:
ⓘ Extracting intro and auth Markdown files to: .scribe
✔ Extracted intro and auth Markdown files to: .scribe
ⓘ Writing Blade docs...
✔ Wrote Blade docs to: resources/views/scribe/
✔ Wrote Laravel assets to: public/vendor/scribe/
ⓘ Generating Postman collection
✔ Wrote Postman collection to: storage/app/scribe/collection.json
ⓘ Generating OpenAPI specification
✔ Wrote OpenAPI specification to: storage/app/scribe/openapi.yaml
Checking for any pending upgrades to your config file...
✔ All done. Visit your docs at http://diet.local/docs
any help would be appreciated.