From 2786259135f92a2c0aba119941670f4bfa7d7f74 Mon Sep 17 00:00:00 2001 From: HID丨emotion <i@hiders.cn> Date: Sat, 1 Aug 2020 14:58:33 +0800 Subject: [PATCH] 修复生成API文档相同分组方法名相同被覆盖问题 修复如两个Controller使用同一个API分组,相同的方法名会产生覆盖的问题 --- application/admin/command/Api/library/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/admin/command/Api/library/Builder.php b/application/admin/command/Api/library/Builder.php index e19a510..ff9b08e 100755 --- a/application/admin/command/Api/library/Builder.php +++ b/application/admin/command/Api/library/Builder.php @@ -190,7 +190,7 @@ class Builder if ($subdomain) { $route = substr($route, 4); } - $docslist[$section][$name] = [ + $docslist[$section][$class . $name] = [ 'id' => $counter, 'method' => is_array($docs['ApiMethod'][0]) ? $docs['ApiMethod'][0]['data'] : $docs['ApiMethod'][0], 'method_label' => $this->generateBadgeForMethod($docs), -- libgit2 0.24.0