Is it possible to put a file-based stub mapping in...
# wiremock-java
d
Is it possible to put a file-based stub mapping in some kind of disabled state? Such stub mapping should not be available for matching against requests but still available to be found through the admin interface. The intention is to have a sort of stub mapping template (or nun-runnable example) that is dormant until activated explicitly.
t
There isn’t an explicit feature for this at the moment but you could achieve it in practice by adding a matcher for a header that doesn’t exist or something like that
d
Tnx for your reply. I understand how headers may help, but those mappings will still be eligible for matching and possibly processed. I was hoping for some flag on stub mapping or maybe metadata that would signal to the in-memory store not to load that mapping. Of course, for the admin scenario, the flag/metadata should be ignored. Never mind, I can live without it, although I think it may be useful. Thank you for the help.
t
You’re not the first to have suggested it. Maybe worth opening a GH issue to discuss how it might work with the community?
d
Ok, I created an enhancement request here: https://github.com/wiremock/wiremock/issues/2754
👍 1