diff --git a/src/main/java/com/power/doc/helper/JsonBuildHelper.java b/src/main/java/com/power/doc/helper/JsonBuildHelper.java index 75baae0..1127198 100644 --- a/src/main/java/com/power/doc/helper/JsonBuildHelper.java +++ b/src/main/java/com/power/doc/helper/JsonBuildHelper.java @@ -415,7 +415,7 @@ public class JsonBuildHelper { data0.append(buildJson(simple, gicName, isResp, nextLevel, registryClasses, groupClasses, builder)).append(","); } } else { - data0.append("{\"waring\":\"You may have used non-display generics.\"},"); + data0.append("{},"); } } else if (DocGlobalConstants.JAVA_OBJECT_FULLY.equals(subTypeName)) { if (StringUtil.isNotEmpty(field.getComment())) { @@ -431,10 +431,10 @@ public class JsonBuildHelper { data0.append(buildJson(simpleName, gicName, isResp, nextLevel, registryClasses, groupClasses, builder)).append(","); } } else { - data0.append("{\"waring\":\"You may have used non-display generics.\"},"); + data0.append("{},"); } } else { - data0.append("{\"waring\":\"You may have used non-display generics.\"},"); + data0.append("{},"); } } else if (typeName.equals(subTypeName)) { data0.append("{\"$ref\":\"...\"}").append(","); diff --git a/src/main/java/com/power/doc/helper/ParamsBuildHelper.java b/src/main/java/com/power/doc/helper/ParamsBuildHelper.java index 72524c8..db98d8c 100644 --- a/src/main/java/com/power/doc/helper/ParamsBuildHelper.java +++ b/src/main/java/com/power/doc/helper/ParamsBuildHelper.java @@ -331,7 +331,19 @@ public class ParamsBuildHelper { String processedType; if (typeSimpleName.length() == 1) { - processedType = DocClassUtil.processTypeNameForParams(typeSimpleName.toLowerCase()); + String gicName = JAVA_OBJECT_FULLY; + if (Objects.nonNull(genericMap.get(typeSimpleName))) { + gicName = genericMap.get(subTypeName); + } else { + if (globGicName.length > 0) { + gicName = globGicName[0]; + } + } + if (JavaClassValidateUtil.isPrimitive(gicName)) { + processedType = DocClassUtil.processTypeNameForParams(gicName); + } else { + processedType = DocClassUtil.processTypeNameForParams(typeSimpleName.toLowerCase()); + } } else { processedType = isShowJavaType ? typeSimpleName : DocClassUtil.processTypeNameForParams(typeSimpleName.toLowerCase()); }