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

For client, visibility("none") should make the property disapear #1916

Open
lmazuel opened this issue Nov 26, 2024 · 1 comment
Open

For client, visibility("none") should make the property disapear #1916

lmazuel opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@lmazuel
Copy link
Member

lmazuel commented Nov 26, 2024

Confirmed with @bterlson , if it's none, make it go away entirely.

I would expect that TCGC does that in a central place, in a way that emitter do not even know it ever existed.

https://github.com/bterlson/typespec-todo/blob/271e2d528ed60e62fbd1c24ed977ed0bc8952fba/main.tsp#L39-L40

  /** Whether the user is validated. Never visible to the API. */
  @visibility("none") validated: boolean;
@lmazuel lmazuel added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Nov 26, 2024
@lmazuel
Copy link
Member Author

lmazuel commented Nov 26, 2024

I was thinking how to write a cadl-ranch test for that, I guess we could go:

 @visibility("none") do_not_send: "literal value";

I believe today if you put a constant like that, we always send it. If it's visibility none, it shouldn't be in the generated model, and the mockapi could test that it never received it.

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

No branches or pull requests

2 participants