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] refine the story of method override #1841

Open
tadelesh opened this issue Nov 12, 2024 · 1 comment
Open

[tcgc] refine the story of method override #1841

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

Comments

@tadelesh
Copy link
Member

currently, we have @override decorator in TCGC to redefine an operation in client.tsp, which is useful for option bags, parameter reordering, etc. however it has not been adopted to all language's emitter since they are not using SdkServiceMethod for now. also, the current implementation does not cover the feature like ignore optional param for specific language, handling bubble up client parameter, etc. open this issue to try to get a solid story for method override.

@tadelesh tadelesh added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Nov 12, 2024
@tadelesh tadelesh self-assigned this Nov 12, 2024
@tadelesh
Copy link
Member Author

two main problems need to discuss:

  1. language has own logic to group or order parameters, which is hard for emitters to fully rely on the method parameters signature. then, how could emitter partially use the tcgc service method info? for example, how do emitter know there should be an option bag.
  2. currently, the override method must have same corresponding parameters with original one, but we do receive ask that need to omit optional parameter for specific reason when generate clients.

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

1 participant