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] The sample generator fails to properly initialize collections #47929

Open
ArthurMa1978 opened this issue Jan 22, 2025 · 0 comments · May be fixed by Azure/autorest.csharp#5225
Open

[BUG] The sample generator fails to properly initialize collections #47929

ArthurMa1978 opened this issue Jan 22, 2025 · 0 comments · May be fixed by Azure/autorest.csharp#5225
Assignees
Labels
CodeGen Issues that relate to code generation Mgmt This issue is related to a management-plane library.

Comments

@ArthurMa1978
Copy link
Member

The property may like this:

public IList<IDictionary<string, string>> Attributes { get; }

Then the generated sample code is

Attributes = {
{
["building"] = "17",
["organization"] = "contoso"
}},

which is incorrect.

The PR is here #47398.

@ArthurMa1978 ArthurMa1978 added the Mgmt This issue is related to a management-plane library. label Jan 22, 2025
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 22, 2025
@jsquire jsquire added CodeGen Issues that relate to code generation and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeGen Issues that relate to code generation Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants