apidoc.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. return [
  3. // 文档标题
  4. 'title'=>'APi接口文档',
  5. // 版权申明
  6. 'copyright'=>'Powered By HG',
  7. //生成文档的控制器
  8. 'controllers' => [
  9. 'api\\controller\\Area',
  10. 'api\\controller\\Article',
  11. 'api\\controller\\Collect',
  12. 'api\\controller\\Datum',
  13. 'api\\controller\\Expedite',
  14. 'api\\controller\\FeedBack',
  15. 'api\\controller\\General',
  16. 'api\\controller\\LevelOrder',
  17. 'api\\controller\\Login',
  18. /* 'api\\controller\\Press',*/
  19. 'api\\controller\\Report',
  20. 'api\\controller\\Sign',
  21. 'api\\controller\\Upload',
  22. 'api\\controller\\UserCenter',
  23. 'api\\controller\\UserManage',
  24. 'api\\controller\\Video',
  25. ],
  26. // 指定公共注释定义的文件地址
  27. 'definitions'=>"app\controller\Definitions",
  28. // 设置可选版本
  29. 'versions'=>[
  30. ['title'=>'V1.0','folder'=>'']
  31. ],
  32. // 控制器分组列表
  33. 'groups'=>[
  34. ],
  35. // 是否开启缓存
  36. 'with_cache'=>false,
  37. // 统一的请求响应体
  38. 'responses'=>'{
  39. "code":"状态码",
  40. "message":"操作描述",
  41. "data":"业务数据",
  42. "timestamp":"响应时间戳"
  43. }',
  44. // 设置全局Authorize时请求头headers携带的key
  45. 'global_auth_key'=>"Authorization",
  46. // 密码验证配置
  47. 'auth'=>[
  48. // 是否启用密码验证
  49. 'with_auth'=>false,
  50. // 验证密码
  51. 'auth_password'=>"123456",
  52. // 验证请求头中apidocToken的字段,默认即可
  53. 'headers_key'=>"apidocToken",
  54. ],
  55. // 过滤、不解析的方法名称
  56. 'filter_method'=>[
  57. '_empty',
  58. '_initialize',
  59. '__construct',
  60. '__destruct',
  61. '__get',
  62. '__set',
  63. '__isset',
  64. '__unset',
  65. '__cal',
  66. ],
  67. ];