接口新增校验匹配条件

This commit is contained in:
akun 2024-05-21 17:56:07 +08:00
parent ac952deb8a
commit 4b4d4cd2b7

View File

@ -219,7 +219,6 @@ public class GatewayInterfaceInfoServiceImpl implements IGatewayInterfaceInfoSer
gatewayInterfaceMockList.forEach(mock -> { gatewayInterfaceMockList.forEach(mock -> {
Assert.notNull(mock.getHttpStatus(), "HTTP状态码不能为空"); Assert.notNull(mock.getHttpStatus(), "HTTP状态码不能为空");
Assert.isTrue(JSONUtils.isJSONObject(mock.getMockResponse()), "请输入正确格式的默认响应信息"); Assert.isTrue(JSONUtils.isJSONObject(mock.getMockResponse()), "请输入正确格式的默认响应信息");
try {
List<MockMatchCondition> conditionDTOList = mock.getMatchConditions(); List<MockMatchCondition> conditionDTOList = mock.getMatchConditions();
Assert.notEmpty(conditionDTOList, "至少存在一条匹配条件"); Assert.notEmpty(conditionDTOList, "至少存在一条匹配条件");
conditionDTOList.forEach(condition -> { conditionDTOList.forEach(condition -> {
@ -241,9 +240,6 @@ public class GatewayInterfaceInfoServiceImpl implements IGatewayInterfaceInfoSer
break; break;
} }
}); });
} catch (Exception e) {
log.error("JSONUtils.isJSONArray catch \n" + e.getMessage());
}
}); });
} }