Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResponseTemplateTransformer for 3.0.0 not documented #157

Closed
manofthepeace opened this issue Aug 30, 2023 · 2 comments
Closed

ResponseTemplateTransformer for 3.0.0 not documented #157

manofthepeace opened this issue Aug 30, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@manofthepeace
Copy link

Summary

I am trying to migrate to wiremock 3.0.0 but I am stuck at pretty much step 1. I am using ResponseTemplateTransformer, and I have no idea how to make it work with 3.0.0, even with the simplest usage.

the documentation here https://wiremock.org/3.x/docs/response-templating/ uses the constructors and builder that does not exist anymore. I tried to adapt manually, but the lack of javadoc + documentation makes it near impossible, unless I am missing something obvious.

basically the following lines are the only ones that gives me compilation error that I do not know how to solve;

new ResponseTemplateTransformer(true) and
new ResponseTemplateTransformer(true, "json", Jackson2Helper.INSTANCE) (using handlebars-jackson)

the new constructor is

  public ResponseTemplateTransformer(
      TemplateEngine templateEngine,
      boolean global,
      FileSource files,
      List<TemplateModelDataProviderExtension> templateModelDataProviders)

Nowhere I can find what the TemplateEngine is or must be, or files, of templateModelDataProviders, nor what is nullable.

For the second case I tried to manually create the templateEngine to add the helper, but it is a nap, and not idea what is the map key, and how it will be used afterward.

Help would be appreciated.

References

https://wiremock.org/3.x/docs/extending-wiremock/ all the TransformingResponses links points to non existing page.
https://wiremock.org/3.x/docs/response-templating/ cannot be followed as it uses the older apis.

@manofthepeace manofthepeace added the documentation Improvements or additions to documentation label Aug 30, 2023
@oleg-nenashev oleg-nenashev transferred this issue from wiremock/wiremock Aug 30, 2023
@oleg-nenashev
Copy link
Member

Thanks for reporting it @manofthepeace. We definitely need to enclose the documentation gaps, and there are plenty of them.

I will look into the obstacles ASAP

@tomakehurst
Copy link
Member

Extension docs have now been updated for the V2 versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Development

No branches or pull requests

3 participants