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] don't require core-introduced params with @override #1435

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

iscai-msft
Copy link
Contributor

With @override, we require a 1:1 mapping between the actual parameters and the parameters passed in your method signature override. However, this causes issues with core-introduced parameters because of template-related issues. On a higher level though, I think it's fair to not require core params in the method signature, since we already hide these parameters in the method signature, and these parameters will still be eventually set to the service

cc @trangevi

@azure-sdk
Copy link
Collaborator

azure-sdk commented Aug 27, 2024

All changed packages have been documented.

  • @azure-tools/typespec-client-generator-core
Show changes

@azure-tools/typespec-client-generator-core - fix ✏️

Don't require params introduced by Azure.Core with @override

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

Copy link
Member

@tadelesh tadelesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another concern is for custom traits, do we also want to ignore these params?

@iscai-msft iscai-msft added this pull request to the merge queue Aug 29, 2024
Merged via the queue into main with commit 44ba378 Aug 29, 2024
22 checks passed
@iscai-msft iscai-msft deleted the tcgc/override/apiVersion branch August 29, 2024 21:21
markcowl pushed a commit to markcowl/typespec-azure that referenced this pull request Sep 7, 2024
)

With `@override`, we require a 1:1 mapping between the actual parameters
and the parameters passed in your method signature override. However,
this causes issues with `core`-introduced parameters because of
template-related issues. On a higher level though, I think it's fair to
not require `core` params in the method signature, since we already hide
these parameters in the method signature, and these parameters will
still be eventually set to the service

cc @trangevi

---------

Co-authored-by: iscai-msft <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants