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

[typespec-python] Bug in generating renamed models #2789

Open
YalinLi0312 opened this issue Aug 22, 2024 · 2 comments
Open

[typespec-python] Bug in generating renamed models #2789

YalinLi0312 opened this issue Aug 22, 2024 · 2 comments
Assignees

Comments

@YalinLi0312
Copy link
Member

YalinLi0312 commented Aug 22, 2024

Renamed models themselves are generated correctly, but not get propagated to all of the usages like in operations and models.
For example, in AppConfig, we renamed the model "Error" to "AppConfigError" in tsp. While in generated code, it's still using the old name as return type in some operations, like in begin_create_snapshot() (note: the return type of this method does not generate correctly, should be LRO[_models.Snapshot]) Also in models, like in model OperationDetails.

Expected:
Should generate with the new name on the renamed models in all usages in the package.

@msyyc
Copy link
Member

msyyc commented Aug 22, 2024

@YalinLi0312

@msyyc
Copy link
Member

msyyc commented Sep 10, 2024

@YalinLi0312 About return type of begin_create_snapshot is wrong which causes by bug of typespec-azure-core and I have created issue https://github.com/Azure/typespec-azure/issues/1407 to track it., according to Azure/typespec-azure#1407 (comment), the typespec author shall update the typespec definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants