From ffc6f2a61304409d0bb66174dbb0654cd820b0bb Mon Sep 17 00:00:00 2001 From: Arcturus Date: Mon, 7 Dec 2020 13:33:40 +0800 Subject: [PATCH] Fix problematic inheritance structure in security (#11156) * Fix problematic inherintance structure * Add back the missing discriminator * Fix examples * rename model --- .../examples/Settings/UpdateSetting_example.json | 3 --- .../preview/2017-08-01-preview/settings.json | 14 ++------------ .../stable/2019-01-01/settings.json | 12 +----------- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Settings/UpdateSetting_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Settings/UpdateSetting_example.json index e9815a163a4d..4f4527c41b41 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Settings/UpdateSetting_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Settings/UpdateSetting_example.json @@ -4,10 +4,7 @@ "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "settingName": "MCAS", "setting": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", - "name": "MCAS", "kind": "DataExportSetting", - "type": "Microsoft.Security/settings", "properties": { "enabled": true } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/settings.json b/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/settings.json index 31f72a422d9b..e46970bbbadf 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/settings.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/settings.json @@ -172,17 +172,6 @@ } } }, - "Setting": { - "type": "object", - "description": "Represents a security setting in Azure Security Center.", - "discriminator": "kind", - "properties": {}, - "allOf": [ - { - "$ref": "#/definitions/SettingResource" - } - ] - }, "DataExportSetting": { "type": "object", "description": "Represents a data export setting", @@ -200,7 +189,7 @@ } ] }, - "SettingResource": { + "Setting": { "type": "object", "description": "The kind of the security setting", "properties": { @@ -225,6 +214,7 @@ } } }, + "discriminator": "kind", "required": [ "kind" ], diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/settings.json b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/settings.json index e408c16ecaa8..d30d34b8cb55 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/settings.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/settings.json @@ -172,16 +172,6 @@ } } }, - "Setting": { - "type": "object", - "description": "Represents a security setting in Azure Security Center.", - "properties": {}, - "allOf": [ - { - "$ref": "#/definitions/SettingResource" - } - ] - }, "DataExportSettings": { "type": "object", "description": "Represents a data export setting", @@ -199,7 +189,7 @@ ], "x-ms-discriminator-value": "DataExportSettings" }, - "SettingResource": { + "Setting": { "type": "object", "description": "The kind of the security setting", "properties": {