Showing error for ResponseTemplateTransformer after upgrading wiremock

218 views Asked by At

How to add custom response template using ResponseTemplateTransformer in wiremock-jre8-standalone 3.0.1 version.

After the upgrage from wiremock-jre8 version 2.32.0 to wiremock-jre8-standalone 3.0.1 version i'm getting error this error for ResponseTemplateTransformer : Expected 4 arguments but found 3

@Contract(pure = true)  
public ResponseTemplateTransformer(     com.github.tomakehurst.wiremock.extension.responsetemplating.TemplateEngine templateEngine,
    boolean global,
    com.github.tomakehurst.wiremock.common.FileSource files,
    java.util.List<com.github.tomakehurst.wiremock.extension.TemplateModelDataProviderExtension> templateModelDataProviders )

code:

@Rule
    WireMockRule wireMockServer = new WireMockRule(WireMockConfiguration
            .options()
            .notifier(new ConsoleNotifier(false))
            .dynamicPort()
            .extensions(new ResponseTemplateTransformer(true))
            .notMatchedRenderer(new CustomPlainTextStubNotMatchedRenderer()));
0

There are 0 answers