Wiremock Standalone with Dynamic response

alltej picture alltej · Oct 17, 2018 · Viewed 9.4k times · Source

I have a standalone instance of Wiremock server. The mappings are stored as json files under the mappings folder. I have a POST request that needs to return a dynamic ID(integer) in the response. Is there a way to configure this in the json file?

Answer

Jeff picture Jeff · Dec 3, 2018

To make the above examples work, I had to run the standalone jar with the --global-response-templating. Then I saw, for example, {{now}} working which is what I wanted. Not sure if the documentation specifies this -- I tried the always-useful --help.