问题描述
在这种情况下,我们正在向wiremock服务器发送多个GET请求。在一个请求中,我们发送3个ID,在另一个请求中,我们发送6个ID。有些ID在两个请求中都很常见。但是两个映射文件的响应都不同。但是,wiremock服务器总是返回映射响应,该响应也具有3个ID的请求,其中包含6个ID的请求(因为其中一些ID是常见的)。
有什么方法可以永久修复它,以便如果有6个id,wiremock将返回MyServiceResponse2.json文件的响应,对于3个id请求,它将返回MyServiceResponse1响应。
以下是请求
"request": {
"urlPathPattern": "/Myservice1/v1/MyEndPoint1","bodyPatterns": [],"method": "GET","queryParameters" : {
"ids" : {
"equalTo" : "Price_22"
},"ids" : {
"equalTo" : "Price_21"
},"ids" : {
"equalTo" : "Price_212"
}
}
"response": {
"status": 200,"headers": {
"Content-Type": "application/json"
},"bodyFileName": "MyServiceResponse1.json"
}
}
whereas in another request,we are sending below request,{
"request": {
"urlPathPattern": "/MyService2/v1/MyEndpoint2","ids" : {
"equalTo" : "Price_212"
},"ids" : {
"equalTo" : "Price_211"
},"ids" : {
"equalTo" : "Price_221"
},"ids" : {
"equalTo" : "Price_231"
}
}
"response": {
"status": 200,"bodyFileName": "MyServiceResponse2.json"
}
}
Is the any way we can change the mapping validation ?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)