Skip to content

Commit 294b57c

Browse files
committed
update5.0.4
1 parent 1b790b3 commit 294b57c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/annotation/Field.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Attribute;
66
use Doctrine\Common\Annotations\Annotation;
7+
use hg\apidoc\utils\AbstractAnnotation;
78

89
/**
910
* 指定Ref的字段
@@ -12,7 +13,7 @@
1213
* @Target({"METHOD"})
1314
*/
1415
#[Attribute(Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
15-
class Field extends Annotation
16+
class Field extends AbstractAnnotation
1617
{
1718
/**
1819
* @param string|array $value 指定Ref的字段,逗号分割

src/parses/ParseApiDetail.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,8 @@ protected function handleApiResponseSuccess($methodAnnotations,$textAnnotations)
242242
$mergeParams = [];
243243
$paramType='success';
244244
if (
245-
(
246-
in_array("NotResponses", $textAnnotations) ||
247-
in_array("NotResponseSuccess", $textAnnotations)
248-
) &&
249-
count($mergeParams)>0
245+
in_array("NotResponses", $textAnnotations) ||
246+
in_array("NotResponseSuccess", $textAnnotations)
250247
) {
251248
// 注解了不使用全局响应
252249
$mergeParams = [];
@@ -328,7 +325,6 @@ protected function handleApiResponseError($methodAnnotations,$textAnnotations){
328325

329326

330327
public static function handleApiBaseInfo($methodInfo,$className,$methodName,$textAnnotations,$config){
331-
// $config = $this->config;
332328
// 无标题,且有文本注释
333329
if (empty($methodInfo['title']) && !empty($textAnnotations) && count($textAnnotations) > 0) {
334330
$methodInfo['title'] = Lang::getLang($textAnnotations[0]);

0 commit comments

Comments
 (0)