https://linen.dev logo
#help
Title
# help
a

Alan Guitard

09/11/2023, 10:35 AM
Hello ! Glad to find out that slack about this great tool ! I am currently trying to migrate to 3.0.1 to play a bit with new functionalities but I am bit blocked by the change in the
ResponseTemplateTransformer
🙂 Here is what I implemented before:
Copy code
new ResponseTemplateTransformer(true, DateTemplate.NAME, dateTemplate)
The
DateTemplate
being a private class implementing the
Helper<T>
. I guess now I have to implement
TemplateModelDataProviderExtension
but I can't find any documentation on how to properly use it. Is its output
Map<String, Object>
is a map of helpers ? Should I just register
TemplateModelDataProviderExtension
like any other extensions through
Options
? Thank you very much for the help, don't hesitate to ask precision !
o

Oleg Nenashev

09/11/2023, 10:42 AM
@Tom ^ And I guess I will need to document it 🙂
t

Tom

09/11/2023, 2:54 PM
Hi @Alan Guitard you’re close, it’s
TemplateHelperProviderExtension
that you need to implement. Here’s the doc showing an example: https://wiremock.org/docs/extensibility/adding-template-helpers/
a

Alan Guitard

09/11/2023, 2:58 PM
Oh nice ! Thank you very much 🙂
j

Julien

09/11/2023, 4:15 PM
Hi 🙂 I'm just implementing custom Helpers as well. Don't forget (like me) to enable global templating "globalTemplating(true)" 🙂
👍 1
2 Views