Change static mappings location #409

Closed
opened 2025-12-29 08:27:35 +01:00 by adam · 2 comments
Owner

Originally created by @RomanPoschl on GitHub (Mar 4, 2022).

Hello, I have integrated WireMock.Net in my Xamarin UI tests. I wanna ask if it is possible to tell for example LoadStaticMapping from this folder. Or way how to efficiently transfer from JSON files to c# methods.

Thank you

Originally created by @RomanPoschl on GitHub (Mar 4, 2022). Hello, I have integrated WireMock.Net in my Xamarin UI tests. I wanna ask if it is possible to tell for example LoadStaticMapping from this folder. Or way how to efficiently transfer from JSON files to c# methods. Thank you
adam added the question label 2025-12-29 08:27:35 +01:00
adam closed this issue 2025-12-29 08:27:35 +01:00
Author
Owner

@StefH commented on GitHub (Mar 10, 2022):

@RomanPoschl

Did you try : 'ReadStaticMappings ' ?

affe388e30/src/WireMock.Net.Abstractions/Server/IWireMockServer.cs (L104)

@StefH commented on GitHub (Mar 10, 2022): @RomanPoschl Did you try : 'ReadStaticMappings ' ? https://github.com/WireMock-Net/WireMock.Net/blob/affe388e3052d31e7054904ed70d1779bdc25838/src/WireMock.Net.Abstractions/Server/IWireMockServer.cs#L104
Author
Owner

@RomanPoschl commented on GitHub (Mar 15, 2022):

@StefH oh that's a method? A used little dirty way.

I created my own FileHandler, where I changed the path.

var settings = new WireMockServerSettings()
			               {
				               Logger = new WiremockDebugLogger(),
				               FileSystemHandler = new WireMockFileSystemFileHandler(),
				               ReadStaticMappings = true,
				               WatchStaticMappings = true,
				               StartAdminInterface = true,
			               };
@RomanPoschl commented on GitHub (Mar 15, 2022): @StefH oh that's a method? A used little dirty way. I created my own FileHandler, where I changed the path. ``` var settings = new WireMockServerSettings() { Logger = new WiremockDebugLogger(), FileSystemHandler = new WireMockFileSystemFileHandler(), ReadStaticMappings = true, WatchStaticMappings = true, StartAdminInterface = true, }; ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#409