From 625085c0a66033891f9f04bf5ff04e0b63851af5 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 6 Jan 2021 17:10:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20swagger3=20=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/api/parse/Swagger3Parser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/parse/Swagger3Parser.java b/backend/src/main/java/io/metersphere/api/parse/Swagger3Parser.java index ac6ae883fa..0498ec4ec2 100644 --- a/backend/src/main/java/io/metersphere/api/parse/Swagger3Parser.java +++ b/backend/src/main/java/io/metersphere/api/parse/Swagger3Parser.java @@ -333,6 +333,9 @@ public class Swagger3Parser extends SwaggerAbstractParser { } private Object parseSchemaProperties(Schema schema, Set refSet, Map infoMap) { + if (schema == null) { + return null; + } Map properties = schema.getProperties(); if (MapUtils.isEmpty(properties)) { return null;