Solved
Forum Discussion
osalonga
Occasional Contributor
To add to the info above, ID from /item/{id} is a template parameter. To summarize the question, how do we specify the mock service dispatch script/parameter if the service has a template parameter?
nmrao
7 years agoChampion Level 3
Hoping that you are using Script Dispatch.
Not tested, but give it a shot.
def id = mockRequest.path.split('/').last() log.info id
Then you can use condition send the respective response.
A sample: