This commit is contained in:
fit2-zhao 2021-01-07 10:42:33 +08:00
commit 3bb9d4c8f1
2 changed files with 4 additions and 1 deletions

View File

@ -325,7 +325,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
requestResult.addPassAssertions();
}
//xpath 提取错误会添加断言错误
if (!responseAssertionResult.getMessage().contains("The required item type of the first operand of")) {
if (StringUtils.isBlank(responseAssertionResult.getMessage()) || !responseAssertionResult.getMessage().contains("The required item type of the first operand of")) {
responseResult.getAssertions().add(responseAssertionResult);
}
}

View File

@ -333,6 +333,9 @@ public class Swagger3Parser extends SwaggerAbstractParser {
}
private Object parseSchemaProperties(Schema schema, Set<String> refSet, Map<String, Schema> infoMap) {
if (schema == null) {
return null;
}
Map<String, Schema> properties = schema.getProperties();
if (MapUtils.isEmpty(properties)) {
return null;