From 5ee0cf46f63694671a8dacbe9bebfdd1ed0bb074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=9E=9C=E7=9A=84=E5=A6=82=E6=9E=9C?= Date: Wed, 12 Aug 2020 15:42:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9Api=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E7=94=A8=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Utility/AnnotationDoc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Utility/AnnotationDoc.php b/src/Utility/AnnotationDoc.php index da14de0..a8d6309 100644 --- a/src/Utility/AnnotationDoc.php +++ b/src/Utility/AnnotationDoc.php @@ -87,8 +87,11 @@ function scan2Markdown(string $dirOrFile):array //兼容api指定 if($method->getApiDescriptionTag()){ $description = $this->parseDescTagContent($method->getApiDescriptionTag()); - }else{ + }else if(!empty($apiTag->description)){ + trigger_error('@Api tag description property is deprecated,use @ApiDescription tag instead',E_USER_DEPRECATED); $description = $apiTag->description; + }else{ + $description = '暂无描述'; } $markdown .= "{$description}{$this->CLRF}";