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

[core-http] sendOperationRequest needs an overload that takes OperationOptions #6457

Closed
bterlson opened this issue Dec 6, 2019 · 5 comments
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.

Comments

@bterlson
Copy link
Member

bterlson commented Dec 6, 2019

Presently the utility method OperationOptionsToRequestOptionsBase must be applied before calling into sendOperationRequest. This should not be necessary.

@ramya-rao-a ramya-rao-a added Azure.Core Client This issue points to a problem in the data-plane of the library. labels Dec 9, 2019
@triage-new-issues triage-new-issues bot removed the triage label Dec 9, 2019
@xirzec
Copy link
Member

xirzec commented Dec 18, 2019

As far as I can tell, sendOperationRequest is a generated method inside the ServiceClients, so the fix here would be to modify the autorest codegen.

@daviwil @joheredi - is this covered by the next-gen autorest work?

@jeremymeng
Copy link
Member

I may be wrong but generated files seem to just import ServiceClient from corehttp

@xirzec
Copy link
Member

xirzec commented Dec 19, 2019

@jeremymeng nah, you're right, I got tricked by VS Code and go to definition. this.sendOperationRequest comes from core-http's ServiceClient, but I didn't notice we were using inheritance for it.

OK this bug is now actionable again.

@xirzec
Copy link
Member

xirzec commented Dec 19, 2019

@jeremymeng OK what I was actually thinking about. The generated method signatures all take an options bag that extends from coreHttp.RequestOptionsBase - which I guess technically can be anything since it has a string index property on it.

I guess the ask in this issue is that we cheat and let that string indexer allow us to pass OperationOptions wholesale and then structurally recognize it on the other side.

@xirzec
Copy link
Member

xirzec commented Jul 27, 2020

This was done in core-client as part of #9854

@xirzec xirzec closed this as completed Jul 27, 2020
@xirzec xirzec removed this from the Backlog milestone May 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

No branches or pull requests

4 participants