You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a stub using the urlPathTemplate: “/contract/app/{pid}/api/{id}/overview”. When I made a request using the path: “/contract/app/1699603961400320001/api/1709863759148662785/overview”, the response was successful. However, when I added a query parameter and used the path: “/contract/app/1699603961400320001/api/1709863759148662785/overview?arg=2” to request, an error occurred with the message: “Path parameter does not match”.
I think it is quite as-designed, but not 100% sure what should be the default behavior (now it is same as absent but should be any matcher which seems to be missing for form parameters at all). I also created wiremock/wiremock.org#206 to have such a case explicitly documented
Proposal
I created a stub using the urlPathTemplate: “/contract/app/{pid}/api/{id}/overview”. When I made a request using the path: “/contract/app/1699603961400320001/api/1709863759148662785/overview”, the response was successful. However, when I added a query parameter and used the path: “/contract/app/1699603961400320001/api/1709863759148662785/overview?arg=2” to request, an error occurred with the message: “Path parameter does not match”.
Reproduction steps
first: the response was successful.
url path:/contract/app/1699603961400320001/api/1709863759148662785/overview
The stub:
{
"id" : "b290dbf6-bed1-435a-b6d9-e4aac8f6035d",
"request" : {
"urlPathTemplate" : "/contract/app/{pid}/api/{id}/overview",
"method" : "GET",
"headers" : {
"accept" : {
"equalTo" : "application/json",
"caseInsensitive" : true
}
},
"pathParameters" : {
"pid" : {
"equalTo" : "1699603961400320001",
"caseInsensitive" : true
},
"id" : {
"equalTo" : "1709863759148662785",
"caseInsensitive" : true
}
},
"queryParameters" : {
"arg" : {
"equalTo" : "2",
"caseInsensitive" : true
}
}
},
"response" : {
"status" : 200,
"body" : "{\r\n "code": 300,\r\n "data": true,\r\n "msg": "success"\r\n}",
"headers" : {
"content-type" : "application/json"
}
},
"uuid" : "b290dbf6-bed1-435a-b6d9-e4aac8f6035d",
"persistent" : true,
"insertionIndex" : 1
}
second: an error occurred with the message: “Path parameter does not match”:
url path:/contract/app/1699603961400320001/api/1709863759148662785/overview?arg=2
the stub:
{
"id" : "b290dbf6-bed1-435a-b6d9-e4aac8f6035d",
"request" : {
"urlPathTemplate" : "/contract/app/{pid}/api/{id}/overview",
"method" : "GET",
"headers" : {
"accept" : {
"equalTo" : "application/json",
"caseInsensitive" : true
}
},
"pathParameters" : {
"pid" : {
"equalTo" : "1699603961400320001",
"caseInsensitive" : true
},
"id" : {
"equalTo" : "1709863759148662785",
"caseInsensitive" : true
}
},
},
"response" : {
"status" : 200,
"body" : "{\r\n "code": 300,\r\n "data": true,\r\n "msg": "success"\r\n}",
"headers" : {
"content-type" : "application/json"
}
},
"uuid" : "b290dbf6-bed1-435a-b6d9-e4aac8f6035d",
"persistent" : true,
"insertionIndex" : 1
}
The error:
![image](https://private-user-images.githubusercontent.com/31637511/273380618-319bfdd9-ea6d-4d14-9554-2b24205009b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwNDA3ODgsIm5iZiI6MTcxODA0MDQ4OCwicGF0aCI6Ii8zMTYzNzUxMS8yNzMzODA2MTgtMzE5YmZkZDktZWE2ZC00ZDE0LTk1NTQtMmIyNDIwNTAwOWIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjEwVDE3MjgwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEzZTE2NDZjOTQyYTRhZDcwM2ZmOGVhZDZjZWY2MjNjZjEzNjE3ODNhMjFjZWYxMWNhYjdlMjQ4OTFmZDNiY2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.lcKGPsnrNVnMpABbNgHqkKINHI09luP5GJ9qxb9ljmQ)
References
No response
The text was updated successfully, but these errors were encountered: