我是 Pact 的新手,我正在尝试使用 pact-python 验证提供者方面的协议,但一些匹配规则被忽略了。
警告:忽略不支持的匹配规则 {"$.num_issues"=>{"matchers"=>[{"match"=>"integer"}], "combine"=>"AND"}, "$.error"=> {"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}, "$.response[0].issue_id"=>{"matchers"=>[{" match"=>"type"}], "combine"=>"AND"}, "$.response[0].msg"=>{"matchers"=>[{"match"=>"type"}] , "combine"=>"AND"}, "$.response[0].similar_fix_found"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND" }, "$.response[1].issue_id"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}, "$.response[1].msg"=>{"matchers"=>[{"match"=>"type"}] , "combine"=>"AND"}, "$.response[1].similar_fix_found"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND" }} 用于路径 ['body']
Consumer 是基于 Java 的 API,Provider 是基于 Python 的 API。
"body": {
"$.num_issues": {
"matchers": [
{
"match": "integer"
}
],
"combine": "AND"
},
"$.error": {
"matchers": [
{
"match": "type"
}
],
"combine": "AND"
},
"$.response[0].issue_id": {
"matchers": [
{
"match": "type"
}
],
"combine": "AND"
},
"$.response[0].msg": {
"matchers": [
{
"match": "type"
}
],
"combine": "AND"
},
"$.response[0].similar_fix_found": {
"matchers": [
{
"match": "type"
}
],
"combine": "AND"
},
"$.response[1].issue_id": {
"matchers": [
{
"match": "type"
}
],
"combine": "AND"
},
"$.response[1].msg": {
"matchers": [
{
"match": "type"
}
],
"combine": "AND"
},
"$.response[1].similar_fix_found": {
"matchers": [
{
"match": "type"
}
],
"combine": "AND"
}
}
}
}
}
],
"metadata": {
"pact-specification": {
"version": "3.0.0"
}
}
手动将协议规范版本更改为 2.0.0 也没有按要求工作。
任何人都可以提出一些建议..?