From a1fa12f51fc369b9e927bab61d4744c92825b141 Mon Sep 17 00:00:00 2001 From: oppofind <836575280@qq.com> Date: Fri, 7 Aug 2020 15:06:08 +0800 Subject: [PATCH] fix validate error --- src/main/java/com/power/doc/helper/ParamsBuildHelper.java | 2 +- .../com/power/doc/template/SpringBootDocBuildTemplate.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/power/doc/helper/ParamsBuildHelper.java b/src/main/java/com/power/doc/helper/ParamsBuildHelper.java index 9039235..a6aeefa 100644 --- a/src/main/java/com/power/doc/helper/ParamsBuildHelper.java +++ b/src/main/java/com/power/doc/helper/ParamsBuildHelper.java @@ -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; diff --git a/src/main/java/com/power/doc/template/SpringBootDocBuildTemplate.java b/src/main/java/com/power/doc/template/SpringBootDocBuildTemplate.java index a537d3c..f21fc4e 100644 --- a/src/main/java/com/power/doc/template/SpringBootDocBuildTemplate.java +++ b/src/main/java/com/power/doc/template/SpringBootDocBuildTemplate.java @@ -520,7 +520,8 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate { } 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());