Skip to content

Commit 621c3b1

Browse files
committed
PR review suggestions
1 parent 6fbe5a2 commit 621c3b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,12 @@ internal static string StripOrAliasNamespacePrefix(IEdmSchemaElement element, Op
379379
segmentName = namespaceAlias.TrimEnd('.') + "." + element.Name;
380380
}
381381

382-
if (settings.NamespacePrefixToStripForInMethodPaths != null &&
382+
if (!string.IsNullOrEmpty(settings.NamespacePrefixToStripForInMethodPaths) &&
383383
element.Namespace.Equals(settings.NamespacePrefixToStripForInMethodPaths, StringComparison.OrdinalIgnoreCase))
384384
{
385-
// Strip specified namespace from operation segment name
385+
// Strip specified namespace from operation segment name.
386+
// If the namespace prefix to strip matches the namespace name,
387+
// and the alias has been appended, the alias will be stripped.
386388
segmentName = element.Name;
387389
}
388390
}

0 commit comments

Comments
 (0)