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

Expose remove stub mapping by ID through admin client (HttpAdminClient) #1684

Closed
marekpietrasz opened this issue Nov 1, 2021 · 3 comments
Closed

Comments

@marekpietrasz
Copy link

Would be great to allow to delete a stub mapping by ID using admin client.

Current behaviour of method wireMock.removeStubMapping on external server leads to post request with json body that in our case matches too many mappings (we have a problem with multiple mappings to the same url and body but this is separate issue).

After checking existing implementation method removeStubMapping on HttpAdminClient is using OldRemoveStubMappingTask. There is also RemoveStubMappingTask that probably was designed to be used against /__admin/mappings/{id} but is not exposed AFAIK

Would be great to expose existing RemoveStubMappingTask and allow to remove mappings by ID to allow better management of stubs (in ideal world stubs are well defined and existing method is good enough but this is not the case for us)

@tomakehurst
Copy link
Member

Yeah, I agree this should be exposed in the Java client, since it's available via REST.

@Patrolfr
Copy link
Contributor

I'm working on it.

Patrolfr added a commit to Patrolfr/wiremock that referenced this issue Oct 14, 2022
Patrolfr added a commit to Patrolfr/wiremock that referenced this issue Oct 14, 2022
@Patrolfr
Copy link
Contributor

PR: #1986

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

No branches or pull requests

3 participants