-
Notifications
You must be signed in to change notification settings - Fork 166
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
Operations not generated as expected from TypeSpec #3344
Comments
@m-nash any suggestions here would be appreciated |
Another operation that is not generated as expected: This method should return TextBlockItem instead of TextBlocklist:
The corresponding typespec code is:
|
See my manual fix for the expected generation: |
The same, see may manual fix for the expected generation: |
as the tsp definition, the operation will take
If you enable to generate convenience method, codegen will generate convenience method
So the operation generated is as expected according to the tsp definition. |
Thanks @chunyu3 for the update! I've checked latest generated code, only the first method is generated and the the second one was not, although I have convenient decorator in tsp: |
@catalinaperalta @mengaims
|
Add @heaths for awareness of these two issues. |
@pshao25, how could sdk user initialize RequestContent if only this method is provided? And for the second issue, what would be the ETA? |
Did your generation improve after removing @convenientAPI? |
As @pshao25 said, this is patch operation, and now we will not auto-gen convenience method for patch operation. |
@mengaims There are sample docs generated in the Docs folder right near the generated code telling you how to create a RequestContent. You could take it as a reference. |
@catalinaperalta The convenientAPI is not the root cause of it, I've tried the typespec without this decorator and things are the same. As Crystal mentioned, this is expected behavior of the generation tool now. But I think from the service point of view, we would need a better method for customer to use. And I will continue this discussion to get knowledge about how to customize it or if manual work is required here. |
File a sperate issue #3386 for incorrect list operation issue. |
So close this. |
Opening this issue that the Content Safety team mentioned in teams:
TypeSpec link: https://github.com/Azure/azure-rest-api-specs-pr/pull/9275
For this operation in typespec:
Generated code has no overload to take both blocklistName and TextBlocklist(or description defined in TextBlocklist), only has following:
@mengaims can provide more information on what is expected here.
The text was updated successfully, but these errors were encountered: