-
Notifications
You must be signed in to change notification settings - Fork 166
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
Ability to add a protocol method to a HLC SDK #1970
Comments
Just FYI, we are currently working on this to solve this issue for storage: Azure/azure-sdk-for-net#25626 We are currently working on the second approach (selectively adding a protocol method). |
What we've done is make it possible to configure an OperationId and the generator will add a protocol method for that operation, in an existing HLC SDK. @lmazuel, we have not addressed your first bullet point. Is this sufficient, or is this issue asking for us to do both bullet points? |
Hi @lmazuel, for this task we will already have HLC SDK generated and we need to generate protocol methods on the top of that. I've some questions about the expectations of this task:
|
One of the two, so we're good :)
Public protocol method, based on some configuration like @annelo-msft just said
This would be unfortunate that in order to expose one method of the Swagger as protocol, we are required to expose all of them. So just some methods based on configuration. We should aim to a world where we always generate protocol methods:
|
Based on @lmazuel's comment we need to generate public protocol methods. For storage we have generated internal protocol methods in RestClient following #1970 (comment) approach. @annelo-msft - I've some questions:
|
What would it take to generate them directly onto the HLCClient? Is that possible if the HLCClient is hand-written with an inner RestClient? If that doesn't make any sense, then we could just add them to the DPG inner client, rename it (it's internal anyway, so the name isn't super important) -- maybe public virtual Response GetProduct(RequestContent content, RequestContext context = null) => _protocolClient.GetProduct(content, context);
I think we should ... would it be possible to update the protocol-method-list so we could specify whether each method is internal or public? |
Sounds good to me! Here is what I think based on your thoughts -
Some benefits of using this approach are:
|
Since only a few non-GA libraries are using It is common for hand-written HLC clients to call through to methods on the RestClient. Since we already have that functionality (to add protocol methods to the inner RestClient), I'll close this issue for now and we can revisit it if we find another approach is needed. |
There are two approaches:
Solution needs to be cost effective, since this is designed to scale fast new methods that don't necessarly requires immediate wrapping with strong design.
The text was updated successfully, but these errors were encountered: