diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java index 104c884d5c..7e9db59b33 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java @@ -308,6 +308,9 @@ public class Swagger3Parser extends SwaggerAbstractParser { } } if (body != null) { + if (body.getKvs() == null) { + body.setKvs(new ArrayList<>()); + } body.getKvs().add(kv); } }