From 63d90338580c6a418e4869cae20dfce514d418c2 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 18 Nov 2020 09:42:01 +0800 Subject: [PATCH] 4.2.0 --- .../com/gitee/sop/websiteserver/manager/SwaggerDocParser.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java b/sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java index 3fe8947a..c212e7e8 100644 --- a/sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java +++ b/sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java @@ -14,9 +14,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.springframework.beans.BeanUtils; import org.springframework.util.CollectionUtils; -import org.springframework.util.DigestUtils; -import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -238,7 +236,7 @@ public class SwaggerDocParser implements DocParser { DocParameter docParameter = fieldInfo.toJavaObject(DocParameter.class); docParameter.setName(fieldName); docParameter.setRequired( - com.alibaba.nacos.common.utils.CollectionUtils.contains(requiredProperties, fieldName)); + !CollectionUtils.isEmpty(requiredProperties) && requiredProperties.contains(fieldName)); if (extProperties != null) { JSONObject prop = extProperties.getJSONObject(fieldName); if (prop != null) {