Merge commit from fork

This commit is contained in:
Stef Heyenrath
2025-03-04 17:58:38 +01:00
committed by GitHub
parent be55022a2a
commit ff36c1ee6f
8 changed files with 86 additions and 20 deletions

View File

@@ -329,4 +329,13 @@ public class WireMockServerSettings
/// </summary>
[PublicAPI]
public string? AdminPath { get; set; }
/// <summary>
/// Defines the allowed custom HandlebarHelpers which can be used. Possible values are:
/// - <see cref="CustomHandlebarHelpers.None"/> (Default)
/// - <see cref="CustomHandlebarHelpers.File"/>
/// - <see cref="CustomHandlebarHelpers.All"/>
/// </summary>
[PublicAPI]
public CustomHandlebarHelpers AllowedCustomHandlebarHelpers { get; set; } = CustomHandlebarHelpers.None;
}

View File

@@ -50,6 +50,7 @@ public static class WireMockServerSettingsParser
AdminPath = parser.GetStringValue(nameof(WireMockServerSettings.AdminPath), "/__admin"),
AllowBodyForAllHttpMethods = parser.GetBoolValue(nameof(WireMockServerSettings.AllowBodyForAllHttpMethods)),
AllowCSharpCodeMatcher = parser.GetBoolValue(nameof(WireMockServerSettings.AllowCSharpCodeMatcher)),
AllowedCustomHandlebarHelpers = parser.GetEnumValue(nameof(WireMockServerSettings.AllowedCustomHandlebarHelpers), CustomHandlebarHelpers.None),
AllowOnlyDefinedHttpStatusCodeInResponse = parser.GetBoolValue(nameof(WireMockServerSettings.AllowOnlyDefinedHttpStatusCodeInResponse)),
AllowPartialMapping = parser.GetBoolValue(nameof(WireMockServerSettings.AllowPartialMapping)),
Culture = parser.GetValue(nameof(WireMockServerSettings.Culture), strings => CultureInfoUtils.Parse(strings.FirstOrDefault()), CultureInfo.CurrentCulture),