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

@visibility "none" not working #2995

Open
swathipil opened this issue Jan 7, 2025 · 2 comments
Open

@visibility "none" not working #2995

swathipil opened this issue Jan 7, 2025 · 2 comments

Comments

@swathipil
Copy link
Member

I'm trying to generate from the specs listed below, without generating the model property CodeFile.LanguageVariant. To do this, I set the visibility of CodeFile.LanguageVariant to "none" in the client.tsp. However, the CodeFile.LanguageVariant model property is still generated.

I generated with the latest version of @azure-tools/typespec-python - 0.37.3.

I would expect that setting visibility to "none" would ensure that the model property is not generated.

client.tsp here
main.tsp here

@ChenxiJiang333
Copy link
Member

Hi @swathipil, it seems work for me when generate python package.
Image

@msyyc
Copy link
Member

msyyc commented Jan 10, 2025

Hi @swathipil It is by design of TCGC to remove property with "none" visibility. So current python emitter will not generate that property after adopt latest TCGC.

Image
https://github.com/Azure/typespec-azure/blob/main/packages/typespec-client-generator-core/CHANGELOG.md#0483

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

3 participants