PACT Broker UI不可视化匹配记录和发电机的使用情况
例如,当我的 PACT 仅包含 type 匹配器而不是匹配字符串的具体值时,我的 PACT Broker UI 不会将其可视化,从而给提供商留下我确实期望提供商提供具体值的印象:
这是我的 PACT 的一部分:
"response": {
"body": {
"content": {
"description": "Example description",
"expensive": false,
"goodRated": false,
"price": 100,
"productId": "string",
"rating": 100,
"title": "string"
},
"contentType": "application/json; charset=UTF-8",
"encoded": false
},
"generators": {
"body": {
"$.price": {
"max": 2147483647,
"min": 0,
"type": "RandomInt"
},
"$.productId": {
"size": 20,
"type": "RandomString"
},
"$.rating": {
"max": 2147483647,
"min": 0,
"type": "RandomInt"
},
"$.title": {
"size": 20,
"type": "RandomString"
}
}
},
"headers": {
"Content-Type": [
"application/json; charset=UTF-8"
]
},
"matchingRules": {
"body": {
"$.description": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
},
"$.price": {
"combine": "AND",
"matchers": [
{
"match": "number"
}
]
},
"$.productId": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
},
"$.rating": {
"combine": "AND",
"matchers": [
{
"match": "number"
}
]
},
"$.title": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
}
}
这就是我的经纪人显示它的方式:
除显示的值外,例如 price
和 为 100 > rating
或“string”用于 title
和“示例描述”用于 description
,我没有发现任何提示这些值都不完全匹配,但全部仅类型匹配。 是我没找到还是怎么的?我想这是 UI 缺乏功能的原因吗?
When my PACT contains type matchers only instead of matching concrete values of Strings for example, my PACT Broker UI does not visualize that and thus, raising the impression for the provider that I do expect concrete values from the provider:
This is a part of my PACT:
"response": {
"body": {
"content": {
"description": "Example description",
"expensive": false,
"goodRated": false,
"price": 100,
"productId": "string",
"rating": 100,
"title": "string"
},
"contentType": "application/json; charset=UTF-8",
"encoded": false
},
"generators": {
"body": {
"$.price": {
"max": 2147483647,
"min": 0,
"type": "RandomInt"
},
"$.productId": {
"size": 20,
"type": "RandomString"
},
"$.rating": {
"max": 2147483647,
"min": 0,
"type": "RandomInt"
},
"$.title": {
"size": 20,
"type": "RandomString"
}
}
},
"headers": {
"Content-Type": [
"application/json; charset=UTF-8"
]
},
"matchingRules": {
"body": {
"$.description": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
},
"$.price": {
"combine": "AND",
"matchers": [
{
"match": "number"
}
]
},
"$.productId": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
},
"$.rating": {
"combine": "AND",
"matchers": [
{
"match": "number"
}
]
},
"$.title": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
}
}
And this is how my broker shows it:
Other than the values shown, like 100 for price
and rating
or "string" for title
and "Example description" for description
, I do not find any hint that none of these values are exact matches but all type matches only.
Do I not find it or something? I suppose this is a lack of feature of the UI?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论