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

tsp codegen for examples is broken with latest tcgc #1441

Closed
jhendrixMSFT opened this issue Oct 17, 2024 · 4 comments · Fixed by #1460
Closed

tsp codegen for examples is broken with latest tcgc #1441

jhendrixMSFT opened this issue Oct 17, 2024 · 4 comments · Fixed by #1460
Assignees
Labels
CodeGen Issues that relate to code generation TypeSpec

Comments

@jhendrixMSFT
Copy link
Member

For reference Azure/typespec-azure#1688

Also observed was some of the ARM modules have missing/incorrect parameters.

@jhendrixMSFT jhendrixMSFT added CodeGen Issues that relate to code generation TypeSpec labels Oct 17, 2024
@jhendrixMSFT
Copy link
Member Author

There are at least two issues here.

  • the api-version is being added as a parameter to method calls
  • some methods are missing parameters

The former is a simple fix.

For the second bullet, an example is in armlargeinstance.

res, err := clientFactory.NewAzureLargeInstanceClient().Update(ctx, "myResourceGroup", "myALInstance", nil)

This method is missing param properties TagsUpdate.

@jhendrixMSFT
Copy link
Member Author

Also impacted is armloadtestservice.

vet.exe: .\zz_loadtests_client_example_test.go:25:105: not enough arguments in call to clientFactory.NewLoadTestsClient().BeginCreateOrUpdate
        have (context.Context, string, string, nil)
        want (context.Context, string, string, armloadtestservice.LoadTestResource, *armloadtestservice.LoadTestsClientBeginCreateOrUpdateOptions)

@jhendrixMSFT
Copy link
Member Author

The api-version issue has been fixed.

@tadelesh
Copy link
Member

confirmed that all the example failure is from setting body parameter name with @encodedName. open tcgc issue here.

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 TypeSpec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants