Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] ArmResourceListByParent does not respect operation name but hard code to ListByResourceGroup. #37

Closed
Tracked by #1356 ...
allenjzhang opened this issue Dec 19, 2023 · 4 comments · Fixed by #1093
Assignees
Labels
external:mgmt external:swagger-converter Issues related to the swagger-converter tool
Milestone

Comments

@allenjzhang
Copy link
Member

Describe the bug
When using ArmResourceListByParent template, operation id is hard coded to _ListByResourceGroup

Expected behavior
listTest should be correctly set in operation_id.

@allenjzhang allenjzhang added the bug Something isn't working label Dec 19, 2023
@allenjzhang allenjzhang added this to the [2024] January milestone Dec 19, 2023
@allenjzhang allenjzhang self-assigned this Dec 19, 2023
@markcowl markcowl removed the bug Something isn't working label Dec 19, 2023
@markcowl
Copy link
Member

There are actually template parameters that set this

@markcowl
Copy link
Member

markcowl commented Dec 19, 2023

I think deferring to 'name' makes sense for parallelism, but we should then have a linting rule that promotes the listBy naming, because these list operations can be combined in client generation.

@markcowl
Copy link
Member

You can do this with a projectedName decorator - this is necessary because we are using a decorator to enforce a particular naming pattern, here is a sample playground

@markcowl
Copy link
Member

markcowl commented Jun 12, 2024

The decorator here is a legacy from when only interface templates were avaiable, and not operation templates. We should likely update the existing interface templates to use this decorator, update any existing specs to specify the correct name in their usage of the operation templates, and remove the decorator from the operation templates altogether.

We may want to also add a linting rule to suggest correct naming patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external:mgmt external:swagger-converter Issues related to the swagger-converter tool
Projects
None yet
5 participants