mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-26 10:18:26 +02:00
Update REST Admin interface to support "Get Mapping(s) as C# Code" (#878)
* Add /__admin/mappings/code endpoint * api * fix * . * fix * . * . * .
This commit is contained in:
@@ -540,6 +540,20 @@ public partial class WireMockServer : IWireMockServer
|
||||
return _mappingBuilder.Given(requestMatcher, saveToFile);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[PublicAPI]
|
||||
public string? MappingToCSharpCode(Guid guid, MappingConverterType converterType)
|
||||
{
|
||||
return _mappingBuilder.ToCSharpCode(guid, converterType);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[PublicAPI]
|
||||
public string MappingsToCSharpCode(MappingConverterType converterType)
|
||||
{
|
||||
return _mappingBuilder.ToCSharpCode(converterType);
|
||||
}
|
||||
|
||||
private void InitSettings(WireMockServerSettings settings)
|
||||
{
|
||||
if (settings.AllowBodyForAllHttpMethods == true)
|
||||
|
||||
Reference in New Issue
Block a user