checkApiParams.php 785 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * 工具 - 查看接口参数规则
  4. */
  5. require_once dirname(__FILE__) . '/../../PhalApi/public/init.php';
  6. $projectName = 'PhalApi开源接口框架';
  7. /**
  8. * TODO: 装载你的接口
  9. */
  10. DI()->loader->addDirs('Appapi');
  11. /**
  12. * 扩展类库
  13. *
  14. * TODO: 请根据需要,添加需要显示的扩展路径,即./Api目录的父路径
  15. */
  16. $libraryPaths = array(
  17. 'Library/User/User', // User扩展
  18. 'Library/Auth/Auth', // Auth扩展
  19. 'Library/Qiniu/CDN', // 七牛扩展
  20. 'Library/WechatMini/WechatMini', // 微信小程序扩展
  21. );
  22. foreach ($libraryPaths as $aPath) {
  23. $toAddDir = str_replace('/', DIRECTORY_SEPARATOR, $aPath);
  24. DI()->loader->addDirs($toAddDir);
  25. }
  26. $apiDesc = new PhalApi_Helper_ApiDesc($projectName);
  27. $apiDesc->render();