I've developed a project using asp.net core 2.0 + wiremock.net. Currently, I'm able to handle json files under "__admin/mappings" directory only. However, I have several json files and because of that, I'd like to add one more folder under the "mappings" directory, for example "__admin/mappings/{anotherFolder}".
What I have:
__admin/mappings/first.json
__admin/mappings/second.json
What I would like to have:
__admin/mappings/folder_A/first.json
__admin/mappings/folder_A/second.json
__admin/mappings/folder_B/first.json
__admin/mappings/folder_B/second.json
I've tried to add one more folder under the "mappings" folder, but when I tried to reach the json route, I got a message "No matching mapping found". Is there any way to handle json files from different directories?
I had to implement my own FileSystemHandler object and pass it on the FluentMockServerSettings constructor:
var stub = FluentMockServer.Start(
new FluentMockServerSettings
{
Urls = new[] {"http://+:5001" },
StartAdminInterface = true,
ReadStaticMappings = true,
WatchStaticMappings = true,
**FileSystemHandler = new CustomFileSystemFileHandler()**
}
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With