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

Support wiremock configuration options #16

Closed
VladimirMorozov opened this issue Oct 23, 2023 · 5 comments · Fixed by #18
Closed

Support wiremock configuration options #16

VladimirMorozov opened this issue Oct 23, 2023 · 5 comments · Fixed by #18

Comments

@VladimirMorozov
Copy link

Currently an instance of WireMockServer is created which you cannot configure further. Annotations don't provide a way to configure options too. What if I want to change transfer encoding or gzip options?

@maciejwalkowiak
Copy link
Collaborator

Yes, this is not supported at the moment, but support can be added. Do you have suggestions how it can be implemented?

@VladimirMorozov
Copy link
Author

Not sure. The most obvious idea is to mirror the options as an annotation. Or maybe create something very similar to WireMockExtension, but allowing to additionally specify a spring property?

@maciejwalkowiak
Copy link
Collaborator

@VladimirMorozov take a look at #18. It adds option to customize WireMockServer on @ConfigureWireMock. I think this could be extended to accept customizers on @EnableWireMock or even global level through some properties file, but both would require a bit more work.

@VladimirMorozov
Copy link
Author

VladimirMorozov commented Oct 29, 2023

Thank you! Maybe this requires too much code to change one option, but I think it's good enough and doesn't restrict you in how and what you want to change.

@maciejwalkowiak
Copy link
Collaborator

maciejwalkowiak commented Oct 29, 2023

@VladimirMorozov we can add more options to annotation too. I just don't want to overload it with everything that's possible and keep it with ones that are used most often. Customizer on the other hand does require a bit of code indeed but gives ultimate flexibility.

Which options do you believe should be added on the annotation level?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants