SaveUnmatchedRequests (#703)

This commit is contained in:
Stef Heyenrath
2021-12-24 09:34:26 +01:00
committed by GitHub
parent 3e1c3598f7
commit 1d1ff4a418
18 changed files with 180 additions and 85 deletions

View File

@@ -213,15 +213,21 @@ namespace WireMock.Settings
bool CustomCertificateDefined { get; }
/// <summary>
/// Defines the global IWebhookSettingsto use
/// Defines the global IWebhookSettings to use.
/// </summary>
[PublicAPI]
IWebhookSettings WebhookSettings { get; set; }
/// <summary>
/// Use the <see cref="RegexExtended"/> instead of the default <see cref="Regex"/>.
/// Use the <see cref="RegexExtended"/> instead of the default <see cref="Regex"/> (default set to true).
/// </summary>
[PublicAPI]
bool? UseRegexExtended { get; }
bool? UseRegexExtended { get; set; }
/// <summary>
/// Save unmatched requests to a file using the <see cref="IFileSystemHandler"/> (default set to false).
/// </summary>
[PublicAPI]
bool? SaveUnmatchedRequests { get; set; }
}
}

View File

@@ -20,7 +20,6 @@ namespace WireMock.Settings
public int? Port { get; set; }
/// <inheritdoc cref="IWireMockServerSettings.UseSSL"/>
// ReSharper disable once InconsistentNaming
[PublicAPI]
public bool? UseSSL { get; set; }
@@ -155,5 +154,9 @@ namespace WireMock.Settings
/// <inheritdoc cref="IWireMockServerSettings.UseRegexExtended"/>
[PublicAPI]
public bool? UseRegexExtended { get; set; } = true;
/// <inheritdoc cref="IWireMockServerSettings.SaveUnmatchedRequests"/>
[PublicAPI]
public bool? SaveUnmatchedRequests { get; set; }
}
}

View File

@@ -49,7 +49,8 @@ namespace WireMock.Settings
DisableJsonBodyParsing = parser.GetBoolValue("DisableJsonBodyParsing"),
HandleRequestsSynchronously = parser.GetBoolValue("HandleRequestsSynchronously"),
ThrowExceptionWhenMatcherFails = parser.GetBoolValue("ThrowExceptionWhenMatcherFails"),
UseRegexExtended = parser.GetBoolValue(nameof(IWireMockServerSettings.UseRegexExtended), true)
UseRegexExtended = parser.GetBoolValue(nameof(IWireMockServerSettings.UseRegexExtended), true),
SaveUnmatchedRequests = parser.GetBoolValue(nameof(IWireMockServerSettings.SaveUnmatchedRequests))
};
if (logger != null)