Update the OpenApiPathsMapper to handle Value/Wildcard (#691)

This commit is contained in:
Stef Heyenrath
2021-11-23 08:09:38 +01:00
committed by GitHub
parent 8865543bf1
commit 897ee9ffe3
8 changed files with 77 additions and 58 deletions

View File

@@ -0,0 +1,21 @@
#if NET46 || NETSTANDARD2_0
using System.Collections.Generic;
namespace WireMock.Net.OpenApiParser.Extensions
{
internal static class DictionaryExtensions
{
public static bool TryAdd<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue value)
{
if (dictionary is null || dictionary.ContainsKey(key))
{
return false;
}
dictionary[key] = value;
return true;
}
}
}
#endif