Skip to content

Commit

Permalink
Fix parent class of ClusterResource and DataCenterResource in .NET SDK (
Browse files Browse the repository at this point in the history
#13244)

* Fix parent class of ClusterResource and DataCenterResource in .NET SDK

Removed x-ms-azure-resource from ClusterResource and DataCenterResource. x-ms-azure-resource is already set on the ProxyResource and TrackedResource definitions that ClusterResource and DataCenterResource, and when it's applied it on ClusterResource or DataCenterResource directly, it forces the parent class to be IResource in the .NET SDK and loses the location, type, id, etc. parameters.

* Switched to CosmosDB's ARM resource parents.

The types.json ones throw errors. In particular, I can't use TrackedResource because it sets location to be required, and the same field is not found by the linter.

* Remove required properties since they are forbidden for PATCH.

* Remove x-ms-client-flatten to avoid breaking changes.
  • Loading branch information
frrossms authored Mar 4, 2021
1 parent 66f033f commit fc86e64
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,6 @@
},
"ClusterResource": {
"description": "Representation of a managed Cassandra cluster.",
"x-ms-azure-resource": true,
"type": "object",
"allOf": [
{
Expand Down Expand Up @@ -991,7 +990,7 @@
"type": "object",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource"
"$ref": "cosmos-db.json#/definitions/ARMProxyResource"
}
],
"properties": {
Expand Down Expand Up @@ -1056,10 +1055,9 @@
"DataCenterResource": {
"description": "A managed Cassandra data center.",
"type": "object",
"x-ms-azure-resource": true,
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource"
"$ref": "cosmos-db.json#/definitions/ARMProxyResource"
}
],
"properties": {
Expand Down

0 comments on commit fc86e64

Please sign in to comment.