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
I have a problem using swagger-php in a Laravel project. I have this problem since my migration from Swagger-PHP 2.x to Swagger-PHP 3.x. The thing is that i'm not able to tell where and why this problem happends.
When I execute this command vendor/zircote/swagger-php/bin/openapi app --format json -o storage/api-docs/test.json --debug
This is what i get
Hi,
I have a problem using swagger-php in a Laravel project. I have this problem since my migration from Swagger-PHP 2.x to Swagger-PHP 3.x. The thing is that i'm not able to tell where and why this problem happends.
When I execute this command
vendor/zircote/swagger-php/bin/openapi app --format json -o storage/api-docs/test.json --debug
This is what i get
TypeError: array_push() expects parameter 1 to be array, string given in /home/project/vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php:173 Stack trace: #0 /home/project/vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php(173): array_push('/api', Object(OpenApi\Annotations\PathItem)) #1 /home/project/vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php(127): OpenApi\Annotations\AbstractAnnotation->merge(Array) #2 /home/project/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(820): OpenApi\Annotations\AbstractAnnotation->__construct(Array) #3 /home/project/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(663): Doctrine\Common\Annotations\DocParser->Annotation() #4 /home/project/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(354): Doctrine\Common\Annotations\DocParser->Annotations() #5 /home/project/vendor/zircote/swagger-php/src/Analyser.php(104): Doctrine\Common\Annotations\DocParser->parse('/** \n * @OA\\Ope...', Object(OpenApi\Context)) #6 /home/project/vendor/zircote/swagger-php/src/StaticAnalyser.php(314): OpenApi\Analyser->fromComment('/** \n * @OA\\Ope...', Object(OpenApi\Context)) #7 /home/project/vendor/zircote/swagger-php/src/StaticAnalyser.php(134): OpenApi\StaticAnalyser->analyseComment(Object(OpenApi\Analysis), Object(OpenApi\Analyser), '/** \n * @OA\\Ope...', Object(OpenApi\Context)) #8 /home/project/vendor/zircote/swagger-php/src/StaticAnalyser.php(45): OpenApi\StaticAnalyser->fromTokens(Array, Object(OpenApi\Context)) #9 /home/project/vendor/zircote/swagger-php/src/functions.php(41): OpenApi\StaticAnalyser->fromFile('app/Http/Contro...') #10 /home/project/vendor/zircote/swagger-php/bin/openapi(223): OpenApi\scan(Array, Array) #11 {main}
I'm unable to link all my code, I'm just looking for a typical problem that produces the same error, that could help me.
Thanks :)
The text was updated successfully, but these errors were encountered: