I would like to use request model attributes in wiremock mappings newScenarioState field.
Is it possible to use request model attributes in newScenarioState
field?
Example:
{
"scenario" : "my-scenario",
"newScenarioState" : "{{request.pathSegment.[1]}}", //or {{request.someId}} ?
"request" : {
"urlPatternTemplate" : "/path/{someId}"
}
}
Unfortunately {{request.pathSegment.[1]}}
will be empty for newScenarioState, but it has proper value under request
json node, looks like variable scope issue.