easy-yapi icon indicating copy to clipboard operation
easy-yapi copied to clipboard

加了method.return这个配置后,void方法也能生成统一返回体

Open WangMengna123 opened this issue 2 years ago • 2 comments

返回类型为void能不能做到不生成统一返回呀 image

WangMengna123 avatar Nov 10 '23 02:11 WangMengna123

method.return[groovy: it.returnType().name()!="void"]=xxxxxxxxxxx

或者

method.return=groovy:```
if(it.returnType().name()=="void"){
    return null
} else {
   return xxxxxxxx
}
```

tangcent avatar Nov 10 '23 03:11 tangcent

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 15 '23 07:12 stale[bot]