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
{{ message }}
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
PROBLEM
So that the description of the schema.yaml is complete, I would also like to show the related models (which are also returned).
This works for the description.
But unfortunately I can't generate any code afterwards.
GIVEN
EXECUTE
./yii gii/api
GENERATION BUG
Exception 'Error' with message 'Call to undefined method cebe\openapi\spec\Schema::getJsonReference()'
in /app/vendor/cebe/yii2-openapi/src/lib/openapi/ResponseSchema.php:52
Stack trace:
#0 /app/vendor/cebe/yii2-openapi/src/lib/openapi/ResponseSchema.php(236): cebe\yii2openapi\lib\openapi\ResponseSchema::schemaNameByRef(Object(cebe\openapi\spec\Schema))
#1 /app/vendor/cebe/yii2-openapi/src/lib/openapi/ResponseSchema.php(151): cebe\yii2openapi\lib\openapi\ResponseSchema::guessModelClassFromContent(Object(cebe\openapi\spec\MediaType))
#2 /app/vendor/cebe/yii2-openapi/src/lib/generators/RestActionGenerator.php(90): cebe\yii2openapi\lib\openapi\ResponseSchema::guessModelClass(Object(cebe\openapi\spec\Operation), 'view')
#3 /app/vendor/cebe/yii2-openapi/src/lib/generators/RestActionGenerator.php(74): cebe\yii2openapi\lib\generators\RestActionGenerator->prepareAction('get', Object(cebe\openapi\spec\Operation), Object(cebe\yii2openapi\lib\items\RouteData))
#4 /app/vendor/cebe/yii2-openapi/src/lib/generators/RestActionGenerator.php(56): cebe\yii2openapi\lib\generators\RestActionGenerator->resolvePath('/account/{id}', Object(cebe\openapi\spec\PathItem))
#5 /app/vendor/cebe/yii2-openapi/src/generator/ApiGenerator.php(469): cebe\yii2openapi\lib\generators\RestActionGenerator->generate()
#6 /app/vendor/yiisoft/yii2-gii/src/console/GenerateAction.php(53): cebe\yii2openapi\generator\ApiGenerator->generate()
#7 /app/vendor/yiisoft/yii2-gii/src/console/GenerateAction.php(36): yii\gii\console\GenerateAction->generateCode()
#8 [internal function]: yii\gii\console\GenerateAction->run()
#9 /app/vendor/yiisoft/yii2/base/Action.php(93): call_user_func_array(Array, Array)
#10 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\Action->runWithParams(Array)
#11 /app/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('api', Array)
#12 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('api', Array)
#13 /app/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('gii/api', Array)
#14 /app/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('gii/api', Array)
#15 /app/vendor/yiisoft/yii2/base/Application.php(384): yii\console\Application->handleRequest(Object(yii\console\Request))
#16 /app/yii(9): yii\base\Application->run()
#17 {main}
The text was updated successfully, but these errors were encountered: