I'm starting to study swagger.
I'm trying to do the same which is done in a book "Hands-On Full Stack Web Development with Angular 6 and Laravel 5".
Using php-fpm bash after typing command "php artisan l5-swagger:generate
"
I have got this exception in VS Code terminal:
root@8e6435be9103:/application# php artisan l5-swagger:generate
Regenerating docs
ErrorException : Required @OA\Info() not found
at /application/vendor/zircote/swagger-php/src/Logger.php:39
35| $this->log = function ($entry, $type) {
36| if ($entry instanceof Exception) {
37| $entry = $entry->getMessage();
> 39| trigger_error($entry, $type);
40| };
41| }
42|
43| /**
Exception trace:
1 trigger_error("Required @OA\Info() not found")
/application/vendor/zircote/swagger-php/src/Logger.php:39
2 OpenApi\Logger::OpenApi\{closure}("Required @OA\Info() not found")
/application/vendor/zircote/swagger-php/src/Logger.php:71
And when I trying to open http://localhost:8081/api/documentation url it gives this error:
Failed to load API definition.
Fetch errorNot Found http://localhost:8081/docs/api-docs.json
I'am using php-fpm bash inside docker. My OS is Ubuntu 18.04.3 LTS.
Can anyone help me to fix this problem. Thank you!!!
* @OA\Get(
– hamed hossani