apidoc.php 2.1 KB

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