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]: Client Name Overrides are failing for model #750

Closed
4 tasks done
sarangan12 opened this issue Apr 26, 2024 · 2 comments
Closed
4 tasks done

[Bug]: Client Name Overrides are failing for model #750

sarangan12 opened this issue Apr 26, 2024 · 2 comments
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library needs-area

Comments

@sarangan12
Copy link
Member

Describe the bug

The @clientname decorator does not work on models.

@xirzec @lmazuel @joheredi FYI....

Note: Originally, this issue was opened at microsoft/typespec#3247. Based on @timotheeguerin comments, Moving the issue to this repository.

Reproduction

The documentation of the clientname decorator says it can be applied to the model also. Refer here.

But, when I apply the decorator to my javascript generator with the following code:

@@clientName(Microsoft.EventGrid.SystemEvents.AcsChatEventBaseProperties,
  "AcsChatEventBase",
  "javascript"
);

the name is not overridden. The generation does not fail. But, this name override does not work. (While other overrides in the same file works). I tried the CADL playground and there also I do not see the name change. Refer here

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For bug in the typespec language or core libraries file it in the TypeSpec repo
  • Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@sarangan12 sarangan12 added the bug Something isn't working label Apr 26, 2024
@lirenhe lirenhe added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Apr 28, 2024
@tadelesh
Copy link
Member

tadelesh commented Apr 28, 2024

Seems similar to #730. Could you please confirm whether you are using the latest tcgc version?

@sarangan12
Copy link
Member Author

@tadelesh Yes. It is the same issue. With the latest version, the issue is resolved. Thanks. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library needs-area
Projects
None yet
Development

No branches or pull requests

3 participants