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

TCGC usage calculation revisit #460

Closed
3 of 5 tasks
tadelesh opened this issue Mar 21, 2024 · 2 comments
Closed
3 of 5 tasks

TCGC usage calculation revisit #460

tadelesh opened this issue Mar 21, 2024 · 2 comments
Assignees
Labels
feature New feature or request lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@tadelesh
Copy link
Member

tadelesh commented Mar 21, 2024

Revisit current calculation logic since .NET and Java has some extra logic.

Java's requirements:

  • Usage calculation should consider visibility
    If a model is only used in a read-only property, despite the property from a round trip model, the model should be labeled with usage input.
  • Body model of patch method with "application/merge-patch+json" content type should be excluded when usage calculation. But patch method with "application/json" content type should not. Finished with [tcgc] add UsageFlags.JsonMergePatch #455
  • Method with multiple content types should be excluded when usage calculation.

.NET requirements:

  • Same as Java 2
  • Same as Java 3
@markcowl markcowl added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Mar 22, 2024
@tadelesh tadelesh self-assigned this Jun 11, 2024
@tadelesh tadelesh added the feature New feature or request label Jun 11, 2024
@iscai-msft
Copy link
Contributor

@tadelesh is visibility still a requirement? I think there's some design that needs to happen there, we shouldn't just directly add visibility to Usage, I'm not sure that's the right course of action

@tadelesh
Copy link
Member Author

@tadelesh is visibility still a requirement? I think there's some design that needs to happen there, we shouldn't just directly add visibility to Usage, I'm not sure that's the right course of action

talked with java and .net folks, we all agree to keep current impl. after typespec has native visibility support, we could change the logic.

close this issue since no further asks about usage.

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

No branches or pull requests

4 participants