-
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
Fixing global parameters for siterecovery and resourcehealth #1753
Changes from 3 commits
4a49385
7b69658
8983664
024fd4f
a80c2da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -548,13 +548,6 @@ | |
"description": "The name of the resource group.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ResourceTypeParameter": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it appears this wasn't been used in the spec or any others in the repo, right? so removing it shouldn't cause any harm. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was not being used and having it in the global parameters section was causing this to be a client property. |
||
"name": "resourceType", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource type." | ||
}, | ||
"FilterParameter": { | ||
"name": "$filter", | ||
"in": "query", | ||
|
@@ -572,4 +565,4 @@ | |
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -564,13 +564,6 @@ | |
"description": "The name of the resource group.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ResourceTypeParameter": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same situation as above here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup |
||
"name": "resourceType", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource type." | ||
}, | ||
"FilterParameter": { | ||
"name": "$filter", | ||
"in": "query", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3130,25 +3130,23 @@ | |
"in": "query", | ||
"description": "The version of the API. This is a required parameter and it's value must be \"2016-09-01\".", | ||
"required": true, | ||
"type": "string", | ||
"enum": [ | ||
"2016-09-01" | ||
], | ||
"default": "2016-09-01" | ||
"type": "string" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @samedder - Can you please take a look at changes I made in the service fabric resource-manager spec.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chingchenmsft needs to sign off on this. I believe this may break our clients so he should verify. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you fix the description as well? "This is a required parameter and it's value must be "2016-09-01"." |
||
}, | ||
"applicationName": { | ||
"name": "applicationName", | ||
"in": "path", | ||
"description": "The name of the application resource.", | ||
"required": true, | ||
"type": "string" | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"applicationTypeName": { | ||
"name": "applicationTypeName", | ||
"in": "path", | ||
"description": "The name of the application type name resource", | ||
"required": true, | ||
"type": "string" | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"clusterNameParameter": { | ||
"name": "clusterName", | ||
|
@@ -3199,7 +3197,8 @@ | |
"in": "path", | ||
"description": "The name of the service resource in the format of {applicationName}~{serviceName}.", | ||
"required": true, | ||
"type": "string" | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"subscriptionId": { | ||
"name": "subscriptionId", | ||
|
@@ -3213,7 +3212,8 @@ | |
"in": "path", | ||
"description": "The application type version.", | ||
"required": true, | ||
"type": "string" | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"clusterBodyParam": { | ||
"name": "Cluster", | ||
|
@@ -3222,7 +3222,8 @@ | |
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/Cluster" | ||
} | ||
}, | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"clusterUpdateParameterBody": { | ||
"name": "ClusterUpdateParameters", | ||
|
@@ -3231,7 +3232,8 @@ | |
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/ClusterUpdateParameters" | ||
} | ||
}, | ||
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} |
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.
what issue was not having this causing? what's the breaking change on generated code due to this?
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.
new SiteRecoveryManagementClient(credentials, subscriptionId, resourceGroupName, resourceName);
This makes the client require resourceGroupName and resourceName in the client constructor. Both of these become client properties and that is incorrect. I had filed an issue in the linter repo about this. If it is management-plane swagger then the linter should warn if it sees anything else apart from subscriptionId and apiVersion and does not have x-ms-parameter-location set to method. 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.
As responded over the mail thread:
As per our scenarios, customers are more likely to work in the context of a single ResourceName, so, It makes more sense to have ResourceGroupName and ResourceName in global parameters section for recoveryservicessiterecovery specification. For more context we have:
Moreover, any change as suggested in the thread would be a breaking change for our existing clients like PowerShell and Ibiza (requires passing ResourceGroupName and ResourceName explicitly as input to every call rather than just once at sdk client initialization) as I can understand, which we would not be able to take at this point.
Let us know if we are missing some point to understand here.
Thanks,
Avneesh