Skip to content
This repository has been archived by the owner on Jun 25, 2023. It is now read-only.

Falla al generar json-docs del paquete swagger #1

Closed
FuriosoJack opened this issue Aug 16, 2019 · 1 comment
Closed

Falla al generar json-docs del paquete swagger #1

FuriosoJack opened this issue Aug 16, 2019 · 1 comment

Comments

@FuriosoJack
Copy link

FuriosoJack commented Aug 16, 2019

Cuando se inicia el proyecto aparece el error en la pagina /api/ubl2.1/documentation

Aparece el error
Fetch errorNot Found http://xxxx:443/docs/api-docs.json

entonces se supone que el error es por que no genero el docs, y al ejecutar el comando

php artisan l5-swagger:generate

se genera el siguiente error

`php
ErrorException : Required @OA\Info() not found

at /var/www/html/dian2/vendor/zircote/swagger-php/src/Logger.php:39
35| $this->log = function ($entry, $type) {
36| if ($entry instanceof Exception) {
37| $entry = $entry->getMessage();
38| }

39| trigger_error($entry, $type);
40| };
41| }
42|
43| /**

Exception trace:

1 trigger_error("Required @OA\Info() not found")
/var/www/html/dian2/vendor/zircote/swagger-php/src/Logger.php:39

2 OpenApi\Logger::OpenApi{closure}("Required @OA\Info() not found")
/var/www/html/dian2/vendor/zircote/swagger-php/src/Logger.php:71

3 call_user_func(Object(Closure), "Required @OA\Info() not found")
/var/www/html/dian2/vendor/zircote/swagger-php/src/Logger.php:71

4 OpenApi\Logger::notice("Required @OA\Info() not found")
/var/www/html/dian2/vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php:424

5 OpenApi\Annotations\AbstractAnnotation::validate([], [], "#")
/var/www/html/dian2/vendor/zircote/swagger-php/src/Annotations/OpenApi.php:135

6 OpenApi\Annotations\OpenApi::validate()
/var/www/html/dian2/vendor/zircote/swagger-php/src/Analysis.php:422

7 OpenApi\Analysis::validate()
/var/www/html/dian2/vendor/zircote/swagger-php/src/functions.php:46

8 OpenApi\scan("/var/www/html/dian2/app/Http/Controllers/Api", [])
/var/www/html/dian2/vendor/darkaonline/l5-swagger/src/Generator.php:119

9 L5Swagger\Generator::scanFilesForDocumentation()
/var/www/html/dian2/vendor/darkaonline/l5-swagger/src/Generator.php:66

10 L5Swagger\Generator::generateDocs()
/var/www/html/dian2/vendor/darkaonline/l5-swagger/src/Console/GenerateDocsCommand.php:32

11 L5Swagger\Console\GenerateDocsCommand::handle()
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32

12 call_user_func_array([])
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32

13 Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90

14 Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure))
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34

15 Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), [])
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Container/Container.php:576

16 Illuminate\Container\Container::call()
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Console/Command.php:183

17 Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
/var/www/html/dian2/vendor/symfony/console/Command/Command.php:255

18 Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Console/Command.php:170

19 Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/var/www/html/dian2/vendor/symfony/console/Application.php:921

20 Symfony\Component\Console\Application::doRunCommand(Object(L5Swagger\Console\GenerateDocsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/var/www/html/dian2/vendor/symfony/console/Application.php:273

21 Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/var/www/html/dian2/vendor/symfony/console/Application.php:149

22 Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Console/Application.php:90

23 Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/var/www/html/dian2/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:133

24 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/var/www/html/dian2/artisan:37
`

Indagando al parecer es por que en algun lugar de la documentación no especificaste la etiqueta info

@Stenfrank
Copy link
Member

The Open Source version does not have annotations in the same way the Open Source version is for you to try and purchase the paid version of the API PRO.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants