This repository was archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
ErrorException: Trying to get property 'schemas' of non-object #8
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
$ cat specs/openapi.yaml
openapi: 3.0.3
info:
title: Test API
version: 1.0.0
paths:
/foo:
get:
description: path 1
responses:
'200':
description: OK
$ ./vendor/bin/php-openapi validate specs/openapi.yaml
The supplied API Description validates against the OpenAPI v3.0 schema.
$ ./yii gii/api --openApiPath=@root/specs/openapi.yaml
Running 'REST API Generator'...
PHP Notice 'yii\base\ErrorException' with message 'Trying to get property 'schemas' of non-object'
in /home/borisov/test/yii/my-api/vendor/cebe/yii2-openapi/src/generator/ApiGenerator.php:585
Stack trace:
#0 /home/borisov/test/yii/my-api/vendor/cebe/yii2-openapi/src/generator/ApiGenerator.php(585): yii\base\ErrorHandler->handleError()
#1 /home/borisov/test/yii/my-api/vendor/cebe/yii2-openapi/src/generator/ApiGenerator.php(890): cebe\yii2openapi\generator\ApiGenerator->generateModels()
#2 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2-gii/src/console/GenerateAction.php(53): cebe\yii2openapi\generator\ApiGenerator->generate()
#3 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2-gii/src/console/GenerateAction.php(36): yii\gii\console\GenerateAction->generateCode()
#4 [internal function]: yii\gii\console\GenerateAction->run()
#5 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array()
#6 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\Action->runWithParams()
#7 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2/console/Controller.php(164): yii\base\Controller->runAction()
#8 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction()
#9 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction()
#10 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction()
#11 /home/borisov/test/yii/my-api/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest()
#12 /home/borisov/test/yii/my-api/yii(9): yii\base\Application->run()
#13 {main}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working