Merge branch 'v1.6'

This commit is contained in:
chenjianxing 2021-01-06 19:20:31 +08:00
commit 5f0a802114
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;