mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-20 15:31:20 +02:00
Option to disable JSON deserialization (#434)
* Option to disable JSON deserialization * Fix build errors, add test case * make new parameter optional * set default for contentType as well
This commit is contained in:
@@ -143,5 +143,11 @@ namespace WireMock.Settings
|
||||
/// </summary>
|
||||
/// [PublicAPI]
|
||||
bool? AllowAnyHttpStatusCodeInResponse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set to true to disable Json deserialization when processing requests. (default set to false).
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
bool? DisableJsonBodyParsing { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -104,5 +104,9 @@ namespace WireMock.Settings
|
||||
|
||||
/// <inheritdoc cref="IWireMockServerSettings.AllowAnyHttpStatusCodeInResponse"/>
|
||||
public bool? AllowAnyHttpStatusCodeInResponse { get; set; }
|
||||
|
||||
/// <inheritdoc cref="IWireMockServerSettings.DisableJsonBodyParsing"/>
|
||||
[PublicAPI]
|
||||
public bool? DisableJsonBodyParsing { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,8 @@ namespace WireMock.Settings
|
||||
RequestLogExpirationDuration = parser.GetIntValue("RequestLogExpirationDuration"),
|
||||
AllowCSharpCodeMatcher = parser.GetBoolValue("AllowCSharpCodeMatcher"),
|
||||
AllowBodyForAllHttpMethods = parser.GetBoolValue("AllowBodyForAllHttpMethods"),
|
||||
AllowAnyHttpStatusCodeInResponse = parser.GetBoolValue("AllowAnyHttpStatusCodeInResponse")
|
||||
AllowAnyHttpStatusCodeInResponse = parser.GetBoolValue("AllowAnyHttpStatusCodeInResponse"),
|
||||
DisableJsonBodyParsing = parser.GetBoolValue("DisableJsonBodyParsing")
|
||||
};
|
||||
|
||||
if (logger != null)
|
||||
|
||||
Reference in New Issue
Block a user