Skip to content

Commit d5652cb

Browse files
author
chengsheng
committed
fixbug
1 parent 395cbf1 commit d5652cb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/com/qbb/build/BuildJsonForYapi.java

+9
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ public static void getRequest(Project project,YapiApiDTO yapiApiDTO,PsiMethod ps
420420
if(Strings.isNullOrEmpty(yapiHeaderDTO.getExample()) && NormalTypes.normalTypes.containsKey(psiParameter.getType().getPresentableText())){
421421
yapiHeaderDTO.setExample(NormalTypes.normalTypes.get(psiParameter.getType().getPresentableText()).toString());
422422
}
423+
if(Strings.isNullOrEmpty(yapiHeaderDTO.getName())){
424+
yapiHeaderDTO.setName(psiParameter.getName());
425+
}
423426
yapiHeaderDTOList.add(yapiHeaderDTO);
424427
}else if(yapiPathVariableDTO!=null){
425428
if(Strings.isNullOrEmpty(yapiPathVariableDTO.getDesc())){
@@ -429,6 +432,9 @@ public static void getRequest(Project project,YapiApiDTO yapiApiDTO,PsiMethod ps
429432
if(Strings.isNullOrEmpty(yapiPathVariableDTO.getExample()) && NormalTypes.normalTypes.containsKey(psiParameter.getType().getPresentableText())){
430433
yapiPathVariableDTO.setExample(NormalTypes.normalTypes.get(psiParameter.getType().getPresentableText()).toString());
431434
}
435+
if(Strings.isNullOrEmpty(yapiPathVariableDTO.getName())){
436+
yapiPathVariableDTO.setName(psiParameter.getName());
437+
}
432438
yapiPathVariableDTOList.add(yapiPathVariableDTO);
433439
}else {
434440
if(Strings.isNullOrEmpty(yapiQueryDTO.getDesc())){
@@ -438,6 +444,9 @@ public static void getRequest(Project project,YapiApiDTO yapiApiDTO,PsiMethod ps
438444
if(Strings.isNullOrEmpty(yapiQueryDTO.getExample()) && NormalTypes.normalTypes.containsKey(psiParameter.getType().getPresentableText()) ){
439445
yapiQueryDTO.setExample(NormalTypes.normalTypes.get(psiParameter.getType().getPresentableText()).toString());
440446
}
447+
if(Strings.isNullOrEmpty(yapiQueryDTO.getName())){
448+
yapiQueryDTO.setName(psiParameter.getName());
449+
}
441450
list.add(yapiQueryDTO);
442451
}
443452
}else{

0 commit comments

Comments
 (0)