-
Notifications
You must be signed in to change notification settings - Fork 75
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
make subscirption id optional if there're tenant level operations #1869
make subscirption id optional if there're tenant level operations #1869
Conversation
...script/test/integration/generated/azureSpecialProperties/src/azureSpecialPropertiesClient.ts
Outdated
Show resolved
Hide resolved
...script/test/integration/generated/azureSpecialProperties/src/azureSpecialPropertiesClient.ts
Show resolved
Hide resolved
packages/autorest.typescript/src/transforms/samplesTransforms.ts
Outdated
Show resolved
Hide resolved
@@ -607,3 +610,21 @@ function getMapperForSchema( | |||
}) | |||
); | |||
} | |||
|
|||
function isOperationTenantLevel(operation: Operation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is my understanding correct?
If one operation has method-level subid defined, the isOperationTenantLevel
would return true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not exactly, an operation is tenant level if there are no client level subscriptionId parameter in the operation, that doesn't mean they need to have method level subscriptionId parameter, because they can even don't have subscriptionId as a parameter at all. The tenant level operation is the condition of adding this overloads to make the subscriptionId optional, but if the whole RP doesn't have any operation that contains the client level subscriptionId parameter, then subscriptionId doesn't even belongs to client constructor signature, then there is not need to add this overloads either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Add return types * Version update * Upgrade the cadl-ranch version to v15 (#1863) * Upgrade the cadl-ranch version * Add test cases for encode * Typo fix * Change to workspace * Remove duplicate generation * make subscirption id optional if there're tenant level operations (#1869) * try fix subscriptionId in tenant level * use overload to fix subscription optional * refine and fix smoke test * fix test and resolve comments * fix sample transform * Re-generate * Add return types * Version update * Remove duplicate generation * Re-generate * Update * re generate tests * use workspace * fix unit test * fix integration test --------- Co-authored-by: Mary Gao <[email protected]> Co-authored-by: Qiaoqiao Zhang <[email protected]> Co-authored-by: qiaozha <[email protected]>
fixes #1864
fixes #1772