Removing one dynamic/inmemory mapping in stand alone mode
401 views
Skip to first unread message
Akshay Deodhar
unread,
Jun 10, 2016, 9:37:57 AM6/10/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremock-user
Fellow WM users,
Currently i am using WireMock in a stand alone mode. I use
http://<host>:<port>/__admin/mappings/new and post json to create my dynamic/in memory stub. I also have some that load via .json files under /mappings directory.
However, i could not find an API to remove one particular stub. So i am having to use - posting an empty req. to http://<host>:<port>/__admin/mappings/reset.
Is there a way to remove just one mapping? if not would that be a useful feature to add?
Akshay
Tom Akehurst
unread,
Jun 10, 2016, 9:45:29 AM6/10/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremock-user
There isn't currently a way to remove a mapping, but if you add a new mapping with an identical request pattern it'll supersede the previous one, so if you make the response a 404 that'll have the same effect.
Akshay Deodhar
unread,
Jun 13, 2016, 10:11:30 AM6/13/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremock-user
i have a local change that i would like to create pull request with. can i get access gitusername is - planetakshay
Tom Akehurst
unread,
Jun 13, 2016, 10:31:00 AM6/13/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremock-user
You don't need any special access to create a PR. If you create one from your fork it'll appear in the queue in the wiremock project.
Two quick things to check - have you read the Contributing section in the README, and have you forked from the 2.0-beta branch?
Akshay Deodhar
unread,
Jun 16, 2016, 8:20:57 AM6/16/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wiremock-user
Tom,
We have been talking on the PR, i have implemented all the changes needed with rst document.