Skip to content

Adds action/function suffix to tag names for action/function operations#642

Merged
timayabi2020 merged 9 commits intosupport/v1from
tm/tagFixes
Jan 20, 2025
Merged

Adds action/function suffix to tag names for action/function operations#642
timayabi2020 merged 9 commits intosupport/v1from
tm/tagFixes

Conversation

@timayabi2020
Copy link
Copy Markdown
Contributor

Fixes #640
Cherry picks from #586 and adds "Actions" or "Functions" as suffixes to the tag. This will

enable the powershell mappings to be updated to target the paths more precisely to fix the incorrect mappings.
enable the user functions/actions to still remain in their current modules by targeting operationIds like user.*.Actions.

irvinesunday and others added 2 commits January 17, 2025 16:50
* Update operation tags generation

* Refactor operation tag generation

* Update unit tests

* Update integration test files

* Update release note

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

Co-authored-by: Andrew Omondi <andrueastman@users.noreply.github.com>

* Account for nullability

* Remove unnecessary code

---------

Co-authored-by: Andrew Omondi <andrueastman@users.noreply.github.com>
Copy link
Copy Markdown
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also lacks unit tests and integration tests updates

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making the changes!

Can you please also put together the reflection of this PR for v2 so things move in sync and we don't have regressions with v2.

Assert.Equal("Customers.Customer.MyFunction1.MyFunction2-4d93", operation2.OperationId);
Assert.Equal("Customers.Customer.MyFunction1.MyFunction2-a2b2", operation3.OperationId);
Assert.Equal("Customers.Customer.MyFunction1.MyFunction2-7bea", operation4.OperationId);
Assert.Equal("Customers.Customer.MyFunction1.MyFunction2-6b6d", operation1.OperationId);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this change is resulting in duplicate operation ids as captured in the validation at microsoftgraph/msgraph-metadata#752

Ideally, the logic here should results in all 4 of the operationIds in the tests being unique

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timayabi2020 can you prioritize a fix for this regression please?
Thank Andrew for catching this and sorry for not seeing it during the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. Created #645 to resolve this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants