-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add support for policy at ManagementGroup level #1754
Conversation
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: File: 💡 Please review potentially introduced Error(s)/Warning(s): Analysis Report 💡 AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The ID of the management group." |
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.
Note: @sarangan12 is still the assigned reviewer. He will be finally reviewing the spec.
@vivsriaus - I noted an anomaly that I wanted to point out. Whenever you define a parameter in the global "prameters" section, Autorest treats it as a client property. This will end up as a required parameter in the constructor. I am sure this is not motive over here. It is ok to define parameters in the global parameters section so that you can reference it at multiple places in the swagger spec. However, if the parameter should not be a client property then please add the following extension: "x-ms-parameter-location": "method"
.
There is an issue filed in the linter repo for checking this Azure/azure-openapi-validator#84
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.
Hey @amarzavery thanks for the comment. I'm not sure what a client property is. What do you mean when you say"required parameter in the constructor"? You mean of the policy client?
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.
Hey @vivsriaus - That is correct. The constructor of the policy client will have a required parameter named managementGroupId
. An example TypeScript client:
class PolicyClient {
. . .
constructor(subscriptionId: string, managementGroupId: string, baseUri: string?, options: OptionalParams) {
. . .
}
}
This would be the case in C# and other languages as well. I am sure this is not the desired behavior. If so then please add the extension "x-ms-parameter-location": "method"
to the parameter in this and the other swagger spec below.
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.
Thanks @amarzavery. Yes, we definitely don't want managementGroupId to be a required parameter in the constructor. I'll make the changes.
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The ID of the management group." |
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.
same as above.
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: File: 💡 Please review potentially introduced Error(s)/Warning(s): Analysis Report 💡 AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
No modification for AutorestCI/azure-sdk-for-node |
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information
api-version
in the path should match theapi-version
in the spec).Quality of Swagger