How can I match against the URL in the Resource element where the port number will change between test runs? Obviously I cannot use templating for requests like I would with responses.
From reviewing the docs on request matching I see that using ```equalToJson``` with placeholders or ```matchesJsonPath``` with a regex expression may be an option but I'm not clear on the exact syntax. Or is there a simpler option that I'm missing?
Thanks,
Mark
Tom Akehurst
unread,
Aug 29, 2021, 4:44:36 PM8/29/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremock-user
If you don't need to match anything in particular for that element you could use a JSON placeholder e.g. "Resource": "${json-unit.any-string}".
If you do need to match the part after the port number then you can use the regex form e.g.: "Resource": "${json-unit.regex}.*/piwebapi/assetdatabases/D0NxzXSxtlKkGzAaZhKOB-KABJ2buwfWrkye3YhdL2FOUAUEhMQUZTMDRcQgYUUEVSRk9STUFOQ0UgVEVTVElORw/elements"}"