Skip to content

Commit fc86e64

Browse files
authored
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.
1 parent 66f033f commit fc86e64

File tree

1 file changed

+2
-4
lines changed
  • specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-03-01-preview

1 file changed

+2
-4
lines changed

specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-03-01-preview/managedCassandra.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,6 @@
771771
},
772772
"ClusterResource": {
773773
"description": "Representation of a managed Cassandra cluster.",
774-
"x-ms-azure-resource": true,
775774
"type": "object",
776775
"allOf": [
777776
{
@@ -991,7 +990,7 @@
991990
"type": "object",
992991
"allOf": [
993992
{
994-
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource"
993+
"$ref": "cosmos-db.json#/definitions/ARMProxyResource"
995994
}
996995
],
997996
"properties": {
@@ -1056,10 +1055,9 @@
10561055
"DataCenterResource": {
10571056
"description": "A managed Cassandra data center.",
10581057
"type": "object",
1059-
"x-ms-azure-resource": true,
10601058
"allOf": [
10611059
{
1062-
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource"
1060+
"$ref": "cosmos-db.json#/definitions/ARMProxyResource"
10631061
}
10641062
],
10651063
"properties": {

0 commit comments

Comments
 (0)