in openapi-diff/src/core/OpenApiDiff.Core/Logging/ObjectPath.cs [43:62]
public static string OpenApiPathName(string path)
=> Regex.Replace(path, @"\{\w*\}", @"{}");
/// <summary>
/// Adding an Open API path.
///
/// For example, if the `opepApiPath` is "/subscription/{a}/{b}" then "a" and "b" parameters
/// will be removed from a search.
/// </summary>
/// <param name="openApiPath"></param>
/// <returns></returns>
public ObjectPath AppendPathProperty(string openApiPath) {
var noParameters = OpenApiPathName(openApiPath);
return Append(t =>
(t as JObject)
?.Properties()
?.FirstOrDefault(p => OpenApiPathName(p.Name) == noParameters)
?.Name
);
}