fix validate error

This commit is contained in:
oppofind 2020-08-07 15:06:08 +08:00
parent 998506295e
commit a1fa12f51f
2 changed files with 3 additions and 2 deletions

View File

@ -181,7 +181,7 @@ public class ParamsBuildHelper {
}
if (hasGroup) {
strRequired = true;
} else if (CollectionUtil.isEmpty(groupClassList) && CollectionUtil.isEmpty(groupClasses)) {
} else if (CollectionUtil.isEmpty(groupClasses)) {
strRequired = true;
}
break an;

View File

@ -520,7 +520,8 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate<ApiDoc> {
} else {
if (requestBodyCounter > 0) {
//for json
paramList.addAll(ParamsBuildHelper.buildParams(gicNameArr[0], DocGlobalConstants.EMPTY, 0, "true", responseFieldMap, Boolean.FALSE, new HashMap<>(), builder, groupClasses,0));
paramList.addAll(ParamsBuildHelper.buildParams(gicNameArr[0], DocGlobalConstants.EMPTY, 0,
"true", responseFieldMap, Boolean.FALSE, new HashMap<>(), builder, groupClasses,0));
} else {
throw new RuntimeException("Spring MVC can't support binding Collection on method "
+ javaMethod.getName() + "Check it in " + javaMethod.getDeclaringClass().getCanonicalName());