Skip to content

Commit

Permalink
Perform case-insensitive operationId and keyType match.
Browse files Browse the repository at this point in the history
  • Loading branch information
peombwa committed Jun 15, 2023
1 parent 038a356 commit 181c6c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Microsoft.OpenApi.Hidi/Formatters/PowerShellFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private static string ResolveVerbSegmentInOpertationId(string operationId)

private static string ResolvePutOperationId(string operationId)
{
return operationId.Contains(DefaultPutPrefix) ?
return operationId.Contains(DefaultPutPrefix, StringComparison.OrdinalIgnoreCase) ?
operationId.Replace(DefaultPutPrefix, PowerShellPutPrefix) : operationId;
}

Expand Down Expand Up @@ -148,7 +148,7 @@ private static string RemoveKeyTypeSegment(string operationId, IList<OpenApiPara
foreach (var parameter in parameters)
{
var keyTypeExtension = parameter.Extensions.GetExtension("x-ms-docs-key-type");
if (keyTypeExtension != null && operationId.Contains(keyTypeExtension))
if (keyTypeExtension != null && operationId.Contains(keyTypeExtension, StringComparison.OrdinalIgnoreCase))
{
segments.Remove(keyTypeExtension);
}
Expand Down

0 comments on commit 181c6c3

Please sign in to comment.