[http-client-java] mgmt premium, fix sample entry point and serviceClient reference for autorest#10082
Open
XiaofeiCao wants to merge 4 commits intomainfrom
Open
[http-client-java] mgmt premium, fix sample entry point and serviceClient reference for autorest#10082XiaofeiCao wants to merge 4 commits intomainfrom
XiaofeiCao wants to merge 4 commits intomainfrom
Conversation
Contributor
|
All changed packages have been documented.
Show changes
|
Collaborator
|
You can try these changes here
|
6 tasks
…microsoft/typespec into java_mgmt_premium_sample_service_client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
When generating premium mgmt samples from Swagger, we switched to use individual entry points in #9845. However, for multi-service scenario(appservice, resources, etc)
PolicyManager, but ratherResourceManager.ResourceManager.serviceClient().getPolicyDefinitions(), but ratherResourceManager.policyClient().getPolicyDefinitions().Solution
We'll need
For 1. Add
service-nameconfig to api-specs.json, to allow for entry point discovery. E.g.ResourceManagerinstead of defaultPolicyManager. PR: Azure/azure-sdk-for-java#48490For 2. We need secondary service client entry mapping. Fortunately, we already have
metadata-suffixthat we can use:E.g. https://github.com/Azure/azure-sdk-for-java/blob/16fffda39d14c6fc6f3f24a972814c429d46c135/sdk/resourcemanager/api-specs.json#L18
Limitation
The fix is mainly for Swagger purpose. Might need a revisit for TypeSpec multi-service.
Will log an issue if we take this approach.
About this PR