Sebastián Gómez
06/26/2024, 3:34 PMBas Dijkstra
06/26/2024, 3:53 PMSebastián Gómez
06/26/2024, 5:06 PMBas Dijkstra
06/26/2024, 5:18 PMurlPathEqualTo()
or urlPathMatching()
query parameters will be ignored. See https://wiremock.org/docs/request-matching/#url-matchingSebastián Gómez
06/26/2024, 5:29 PMurlPathTemplate
because I need to extract some info with regular expressions... would query parameters be ignored in that case?
Sorry I have so many questions, just starting with WireMock and I have not been able to find this infoBas Dijkstra
06/26/2024, 5:37 PMurlPathMatching()
takes a regex if I recall correctly. Are you defining responses in code or in JSON files?Sebastián Gómez
06/26/2024, 6:08 PMBas Dijkstra
06/26/2024, 6:24 PMSebastián Gómez
06/26/2024, 7:22 PMBas Dijkstra
06/26/2024, 8:00 PMSebastián Gómez
06/26/2024, 8:07 PM"request": {
"method": "GET",
"urlPathTemplate": "/v1/profiles/{profileId}/groups",
"pathParameters": {
"profileId": {
"matches": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
}
},
"queryParameters": {
"space": {
"matches": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
}
}
}
The stub would match a GET to any url with a path that matches that regular expression with a parameter (space) which must be there... am I right?Bas Dijkstra
06/26/2024, 8:44 PM