From 018243c4aa5df29a7e87fe662065a626070d1e06 Mon Sep 17 00:00:00 2001 From: laoliangliang Date: Tue, 2 Jan 2024 10:45:35 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=BC=E5=85=A5required=E5=8F=82=E6=95=B0=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/parse/PostmanAbstractParserParser.java | 2 +- .../java/io/metersphere/api/parse/postman/PostmanKeyValue.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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() { }