Skip to content

Commit 829713c

Browse files
committed
JSON注释:GET和HEAD内tag,version不注释
1 parent f90cef8 commit 829713c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apijson/CodeUtil.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,14 @@ var CodeUtil = {
839839
if (StringUtil.isEmpty(name)) {
840840
switch (key) {
841841
case 'tag':
842+
if (method == 'GET' || method == 'HEAD') {
843+
return '';
844+
}
842845
return CodeUtil.getType4Request(value) != 'string' ? ' ! value必须是String类型!' : CodeUtil.getComment('请求密钥', false, ' ');
843846
case 'version':
847+
if (method == 'GET' || method == 'HEAD') {
848+
return '';
849+
}
844850
return CodeUtil.getType4Request(value) != 'number' ? ' ! value必须是Number类型!' : CodeUtil.getComment('版本号', false, ' ');
845851
case '@role':
846852
try {

0 commit comments

Comments
 (0)