Added support of custom matchers in static mappings (#713)

* Added support of custom matchers in static mappings

* Fixed code style issues

* Fixed naming and code style

* added empty line

* Ignore serialization of CustomMatcherMappings property in WireMockServerSettings

* Added integration tests for CustomMatcherMappings
This commit is contained in:
Levan Nozadze
2022-01-17 19:04:37 +04:00
committed by GitHub
parent 60bdc06d29
commit 6b393ebc1d
7 changed files with 321 additions and 0 deletions

View File

@@ -1,9 +1,12 @@
using System;
using System.Collections.Generic;
using HandlebarsDotNet;
using JetBrains.Annotations;
using Newtonsoft.Json;
using WireMock.Admin.Mappings;
using WireMock.Handlers;
using WireMock.Logging;
using WireMock.Matchers;
#if USE_ASPNETCORE
using Microsoft.Extensions.DependencyInjection;
#endif
@@ -158,5 +161,9 @@ namespace WireMock.Settings
/// <inheritdoc cref="IWireMockServerSettings.SaveUnmatchedRequests"/>
[PublicAPI]
public bool? SaveUnmatchedRequests { get; set; }
/// <inheritdoc cref="IWireMockServerSettings.CustomMatcherMappings"/>
[PublicAPI, JsonIgnore]
public IDictionary<string, Func<MatcherModel, IMatcher>> CustomMatcherMappings { get; set; }
}
}