hyperf-apihelper
hyperf-apihelper copied to clipboard
hyperf api swagger helper -[api接口自动验证和swagger接口文档生成] 组件
[CRITICAL] Call to undefined method Hyperf\Translation\TranslatorFactory::trans()[346] in /data/vendor/kakuilan/hyperf-apihelper/src/Validation/Validator.php [CRITICAL] #0 [internal function]: Hyperf\Apihelper\Validation\Validator->rule_enum() #1 /data/vendor/kakuilan/hyperf-apihelper/src/Validation/Validator.php(172): call_user_func_array() #2 /data/runtime/container/proxy/App_Middleware_ApiValidationMiddleware.proxy.php(217): Hyperf\Apihelper\Validation\Validator->validate()
   
[ERROR] Return value of Hyperf\HttpServer\Server::getServerName() must be of the type string, null returned[137] [ERROR] #0 ***/backend-svc/runtime/container/proxy/Hyperf_Apihelper_Middleware_ApiValidationMiddleware.proxy.php(79): Hyperf\HttpServer\Server->getServerName()
文档中只有 FROM, 或直接一个body对象的例子,且那个testBody例子也没说怎么取值调用 一般前后端分离项目都用body,json交互, 目前貌似body定义接口参数不太友好, 并且也无法生成友好的swagger接口