diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java index 52f2ad4cf5..f255015a62 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java @@ -128,7 +128,7 @@ public abstract class PostmanAbstractParserParser extends ApiImportAbstractPa String k = parseVariable(item.getKey()); String v = parseVariable(item.getValue()); String desc = parseVariable(item.getDescription()); - KeyValue keyValue = new KeyValue(k, v, desc, item.getContentType()); + KeyValue keyValue = new KeyValue(k, v, desc, item.getContentType(), item.isRequired()); if (StringUtils.isNotBlank(item.getType()) && StringUtils.equals("file", item.getType())) { keyValue.setType("file"); } diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/postman/PostmanKeyValue.java b/api-test/backend/src/main/java/io/metersphere/api/parse/postman/PostmanKeyValue.java index e1fea643eb..1ffb246a23 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/postman/PostmanKeyValue.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/postman/PostmanKeyValue.java @@ -9,6 +9,7 @@ public class PostmanKeyValue { private String type; private String description; private String contentType; + private boolean required; public PostmanKeyValue() { }