Let's say you have to develop a monitor service, and you need a heartbeat or ping API. Something simple that returns an error code and some more info, so you can take decisions and do something about the process being monitored...
And then you need a mock, so you can test your api...
$msg wmq.ping : (errCode, errMsg, tcpStatus)
$mock wmq.ping => (errCode="1000", errMsg="Oopsie", tcpStatus = "FAIL" )
{{template wmq.ping:response:content-type="application/text"}}
{
"errCode" : "$errCode",
"errMsg" : "$errMsg",
"tcpStatus" : "$tcpStatus"
}
{{/template}}
It's fairly straight forward: the first line defines the ping service API and the second line mocks it. Then it's just the formatting of the actual payload.