调用未定义的函数 OpenApi\scan() 使用 @SWG swagger Annotation in larav



我想在The Laravel上使用@SWG注释,但是发生了错误。

调用未定义的函数 OpenApi\scan((

这是我的作曲家.json

"require": {
"php": "^7.2",
"barryvdh/laravel-cors": "^0.11.4",
"darkaonline/l5-swagger": "^6.0",
"fideloper/proxy": "^4.0",
"laravel/framework": "^6.2",
"laravel/tinker": "^1.0",
"laravel/ui": "^1.1",
"zircote/swagger-php": "2.*"
}

这是我的招摇代码

/**
*
* @SWGSwagger(
*     basePath="/api/",
*     schemes={"http"},
*     host="192.168.1.248:8000",
*     @SWGInfo(
*         version="1.0.0",
*         title="Shahab web service api",
*         description="this api is written to handle frontend requests for Shahab.",
*         @SWGContact(
*             email="shahab@gmail.com"
*         ),
*     )
* )
*/
composer require zircote/swagger-php

更新版本 3.* 默认值

做!。

最新更新