Skip to content

Commit 547c7c0

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Updated the case statement by explicitly checking if operation is an action or a function
1 parent 23a9fbe commit 547c7c0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Microsoft.OpenApi.OData.Reader/Operation/EdmOperationOperationHandler.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,16 @@ private void GenerateTagName(out string tagName, int skip = 1)
173173
break;
174174
// If the operation is a function or action, append the word "Function" or "Action" to the tag name
175175
case ODataOperationSegment operationSegment:
176-
string suffixName = operationSegment.Operation.IsAction() ? operationSegment.Operation.Name + "Actions" : operationSegment.Operation.Name + "Functions";
177-
tagName = NavigationSource.Name + "." + NavigationSource.EntityType.Name + "." + suffixName;
176+
tagName = NavigationSource.Name + "." + NavigationSource.EntityType.Name;
177+
if(operationSegment.Operation.IsAction())
178+
{
179+
tagName += ".Actions";
180+
}
181+
182+
if(operationSegment.Operation.IsFunction())
183+
{
184+
tagName += ".Functions";
185+
}
178186
break;
179187
default:
180188
tagName = NavigationSource.Name + "." + NavigationSource.EntityType.Name;

0 commit comments

Comments
 (0)