From 9d0786f2cec1f50d25754e8302dffebb21755997 Mon Sep 17 00:00:00 2001 From: frrossms <71098903+frrossms@users.noreply.github.com> Date: Wed, 3 Mar 2021 16:14:10 -0800 Subject: [PATCH] Fix parent class of ClusterResource and DataCenterResource in .NET SDK (#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. --- .../preview/2021-03-01-preview/managedCassandra.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-03-01-preview/managedCassandra.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-03-01-preview/managedCassandra.json index 2427fbdf349d..e92d963c7d24 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-03-01-preview/managedCassandra.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-03-01-preview/managedCassandra.json @@ -771,7 +771,6 @@ }, "ClusterResource": { "description": "Representation of a managed Cassandra cluster.", - "x-ms-azure-resource": true, "type": "object", "allOf": [ { @@ -991,7 +990,7 @@ "type": "object", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + "$ref": "cosmos-db.json#/definitions/ARMProxyResource" } ], "properties": { @@ -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": {