This is currently a todo at
(note that this is on the 'modules' branch).
We should be able to use the existing request handler code for the templating.
An example for the 'service' stanza is at https://github.com/wikimedia/restbase/blob/a9b13b658bc392f3e3c2e1c27026d65be68d7d7c/interfaces/mediawiki/v1/content.yaml#L47. It is intended to support full request templating the way the request handler does as well.
Example template:
{ method: 'post', uri: '/{domain}/...', headers: { 'cache-control': '{cache-control}', 'foobar': 'Some value' }, body: { a: '{a}' // equivalent to $.request.body.a } }