Chien Dinh
01/19/2024, 9:43 PMconst request: IWireMockRequest = {
method: 'GET',
endpoint: '\/contests\/\d+-\d+\/entries\?page=1&page_size=100&user=22',
}
const response: IWireMockResponse = {
status: 200,
body: ***,
}
const features: IWireMockFeatures = {
requestEndpointFeature: EndpointFeature.UrlPattern,
}
when I try to register the above to my wiremock server, i see in my logs that its registering the regex as:
{"request":{"method":"GET","urlPattern":"/contests/d+-d+/entries?page=1&page_size=100&user=22"}
in which the /d+-d+/ looks incorrect and its not doing the regex correctly. I've tried to use \\d+ instead of \d+ but instead of it showing up as \d+
when registered, it shows up as \\d+
so i'm at a loss as to the correct way to escape the regexChien Dinh
01/22/2024, 5:52 PMLee Turner
01/22/2024, 6:18 PMwiremock-captain
and am not a js developer so don't have a huge amount of knowledge in this area. Not sure if other members of the community have.
Does this seem to be an issue with how wiremock-captain is creating the mappings ? If so I was wondering if you would get a more targeted response if you raised an issue on the wiremock-captain github page - https://github.com/HBOCodeLabs/wiremock-captainChien Dinh
01/22/2024, 6:39 PM