我想为同一个 PUT URL 匹配不同的主体,但是 stubby4j 总是匹配第一种情况,不管主体的内容是什么。
例子:
- request:
url: /individuals/.*/address$
method: PUT
body: >
{
"type": "MOBILE",
(other input fields)
}
response:
status: 400
body: >
{
"type": "BAD_REQUEST",
"message": "Validation error on request."
}
- request:
url: /individuals/.*/address$
method: PUT
body: >
{
"type": "HOME",
(other input fields)
}
response:
status: 200
在这种情况下,无论我的请求中参数“type”的值是什么,它总是与第一个存根匹配。