From f262d7a1465329d71f3fde30e07830081b119ffe Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 30 Jul 2021 10:54:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20swagger=E5=AF=BC=E5=85=A5=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/dto/definition/parse/Swagger3Parser.java | 3 +++ 1 file changed, 3 insertions(+) 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); } }