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

A Stubmapping can be removed by ID #2393

Open
burcuakkayaa opened this issue Sep 21, 2023 · 1 comment
Open

A Stubmapping can be removed by ID #2393

burcuakkayaa opened this issue Sep 21, 2023 · 1 comment

Comments

@burcuakkayaa
Copy link
Contributor

burcuakkayaa commented Sep 21, 2023

Proposal

Hi,
I created multiple stubmappings with a same url and define spesific Id with using '.withId(specificStubMockId)' function on MappingBuilder.
Sometimes I need to remove stubs in function and if can we remove them with Id it can be more usable for it.
right now I used it 'WireMock.removeStub(WireMock.post("").withId(specificStubMockId))' but I hope your team will be provide better experience. thank you

References

No response

@tomakehurst
Copy link
Member

There's already an API call to do this (DELETE /__admin/mappings/<uuid>), but it's not exposed via the Java DSL so this would be a good thing to add.

It should be pretty easy to do if you feel like creating a PR?

burcuakkayaa pushed a commit to burcuakkayaa/wiremock that referenced this issue Oct 2, 2023
leeturner added a commit that referenced this issue Mar 5, 2024
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

2 participants