Skip to content
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

Closed
borisovg opened this issue Apr 13, 2020 · 1 comment
Closed

ErrorException: Trying to get property 'schemas' of non-object #8

borisovg opened this issue Apr 13, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@borisovg
Copy link

$ 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}
@cebe cebe added the bug Something isn't working label Apr 14, 2020
@cebe cebe added this to the 1.0.3 milestone Apr 14, 2020
@cebe
Copy link
Owner

cebe commented Oct 13, 2021

should be solved in todays released 2.0-alpha version.

Install via composer require cebe/yii2-openapi:^2.0@alpha

@cebe cebe closed this as completed Oct 13, 2021
@cebe cebe modified the milestones: 1.0.3, 2.0 Oct 13, 2021
cebe pushed a commit that referenced this issue Jan 5, 2023
…b2-in-pgsql-in-library-source-code

Fix issue 126 - Don't use second db 'pg_test_db_2' in PgSQL in library source code
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants