From 1116ffbeb9d019f8e5fe0be14845428e97ea9fa0 Mon Sep 17 00:00:00 2001 From: Tal Klein Date: Sun, 26 Apr 2020 09:50:12 +0300 Subject: [PATCH 1/8] fixed settings api. changed the dataexportsetting parameter name and the discriminator place --- .../examples/Settings/GetSetting_example.json | 2 +- .../examples/Settings/GetSettings_example.json | 4 ++-- .../examples/Settings/UpdateSetting_example.json | 4 ++-- .../stable/2019-01-01/settings.json | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSetting_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSetting_example.json index 31c7b88df1db..808d5e9e47c4 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSetting_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSetting_example.json @@ -9,7 +9,7 @@ "body": { "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", "name": "MCAS", - "kind": "DataExportSetting", + "kind": "DataExportSettings", "type": "Microsoft.Security/settings", "properties": { "enabled": true diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSettings_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSettings_example.json index 87d7aa5a6c58..4def4e3f66c6 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSettings_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSettings_example.json @@ -10,7 +10,7 @@ { "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", "name": "MCAS", - "kind": "DataExportSetting", + "kind": "DataExportSettings", "type": "Microsoft.Security/settings", "properties": { "enabled": true @@ -19,7 +19,7 @@ { "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP", "name": "WDATP", - "kind": "DataExportSetting", + "kind": "DataExportSettings", "type": "Microsoft.Security/settings", "properties": { "enabled": false diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json index 789ebb7d6219..cca927c92c84 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json @@ -6,7 +6,7 @@ "setting": { "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", "name": "MCAS", - "kind": "DataExportSetting", + "kind": "DataExportSettings", "type": "Microsoft.Security/settings", "properties": { "enabled": true @@ -18,7 +18,7 @@ "body": { "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", "name": "MCAS", - "kind": "DataExportSetting", + "kind": "DataExportSettings", "type": "Microsoft.Security/settings", "properties": { "enabled": true 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 15e9f74f8d87..0ba9c732ceb4 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 @@ -175,7 +175,6 @@ "Setting": { "type": "object", "description": "Represents a security setting in Azure Security Center.", - "discriminator": "kind", "properties": {}, "allOf": [ { @@ -183,10 +182,9 @@ } ] }, - "DataExportSetting": { + "DataExportSettings": { "type": "object", "description": "Represents a data export setting", - "x-ms-discriminator-value": "DataExportSetting", "properties": { "properties": { "x-ms-client-flatten": true, @@ -198,7 +196,8 @@ { "$ref": "#/definitions/Setting" } - ] + ], + "x-ms-discriminator-value": "DataExportSettings" }, "SettingResource": { "type": "object", @@ -206,9 +205,9 @@ "properties": { "kind": { "type": "string", - "description": "the kind of the settings string (DataExportSetting)", + "description": "the kind of the settings string (DataExportSettings)", "enum": [ - "DataExportSetting", + "DataExportSettings", "AlertSuppressionSetting" ], "x-ms-enum": { @@ -216,7 +215,7 @@ "modelAsString": true, "values": [ { - "value": "DataExportSetting" + "value": "DataExportSettings" }, { "value": "AlertSuppressionSetting" @@ -225,6 +224,7 @@ } } }, + "discriminator": "kind", "required": [ "kind" ], @@ -272,4 +272,4 @@ "x-ms-parameter-location": "method" } } -} +} \ No newline at end of file From 705ec48d7e0b09385510491753603dc06918a275 Mon Sep 17 00:00:00 2001 From: Tal Klein Date: Sun, 26 Apr 2020 11:13:28 +0300 Subject: [PATCH 2/8] deleted propersties --- .../Microsoft.Security/stable/2019-01-01/settings.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 0ba9c732ceb4..cd26ea1cae3c 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 @@ -175,7 +175,6 @@ "Setting": { "type": "object", "description": "Represents a security setting in Azure Security Center.", - "properties": {}, "allOf": [ { "$ref": "#/definitions/SettingResource" @@ -197,7 +196,7 @@ "$ref": "#/definitions/Setting" } ], - "x-ms-discriminator-value": "DataExportSettings" + "x-ms-discriminator-value": "DataExportSettings" }, "SettingResource": { "type": "object", @@ -224,7 +223,7 @@ } } }, - "discriminator": "kind", + "discriminator": "kind", "required": [ "kind" ], From 4d4aed807e32fe1fd0abf2831fd9b694a0df333d Mon Sep 17 00:00:00 2001 From: Tal Klein Date: Sun, 26 Apr 2020 11:46:23 +0300 Subject: [PATCH 3/8] ran prettier fix --- .../Microsoft.Security/stable/2019-01-01/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 cd26ea1cae3c..dd3d2a022358 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 @@ -271,4 +271,4 @@ "x-ms-parameter-location": "method" } } -} \ No newline at end of file +} From 7ee1d54466dd48c8f4610563f7079d009df05bdf Mon Sep 17 00:00:00 2001 From: Tal Klein Date: Thu, 30 Apr 2020 16:21:11 +0300 Subject: [PATCH 4/8] fixed update test and added properties in Settings definition --- .../2019-01-01/examples/Settings/UpdateSetting_example.json | 1 - .../Microsoft.Security/stable/2019-01-01/settings.json | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json index cca927c92c84..29ea7fb66ecc 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json @@ -7,7 +7,6 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", "name": "MCAS", "kind": "DataExportSettings", - "type": "Microsoft.Security/settings", "properties": { "enabled": true } 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 dd3d2a022358..bd8e759b72ca 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 @@ -174,6 +174,8 @@ }, "Setting": { "type": "object", + "additionalProperties": true, + "properties": {}, "description": "Represents a security setting in Azure Security Center.", "allOf": [ { From c89bd900c4147ab472caaaf8856d28b62db2e69d Mon Sep 17 00:00:00 2001 From: Tal Klein Date: Thu, 30 Apr 2020 17:38:25 +0300 Subject: [PATCH 5/8] deleting additionalproperties because of autorest errors --- .../Microsoft.Security/stable/2019-01-01/settings.json | 1 - 1 file changed, 1 deletion(-) 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 bd8e759b72ca..dd1aee68f6bb 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 @@ -174,7 +174,6 @@ }, "Setting": { "type": "object", - "additionalProperties": true, "properties": {}, "description": "Represents a security setting in Azure Security Center.", "allOf": [ From 46412c4e38f9706ad0cd86d47c2656f2ac738269 Mon Sep 17 00:00:00 2001 From: Tal Klein Date: Thu, 30 Apr 2020 18:21:18 +0300 Subject: [PATCH 6/8] adding back additionalProperties --- .../Microsoft.Security/stable/2019-01-01/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 dd1aee68f6bb..fdd54cd6a9ee 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 @@ -174,7 +174,6 @@ }, "Setting": { "type": "object", - "properties": {}, "description": "Represents a security setting in Azure Security Center.", "allOf": [ { @@ -202,6 +201,7 @@ "SettingResource": { "type": "object", "description": "The kind of the security setting", + "additionalProperties": true, "properties": { "kind": { "type": "string", From 3e05a6828181aa8f819c11d0d505cf407a639339 Mon Sep 17 00:00:00 2001 From: Tal Klein Date: Sat, 2 May 2020 11:35:59 +0300 Subject: [PATCH 7/8] deleting a readonly property from the example --- .../2019-01-01/examples/Settings/UpdateSetting_example.json | 1 - .../Microsoft.Security/stable/2019-01-01/settings.json | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json index 29ea7fb66ecc..af3dc01be6de 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json @@ -5,7 +5,6 @@ "settingName": "MCAS", "setting": { "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", - "name": "MCAS", "kind": "DataExportSettings", "properties": { "enabled": true 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 fdd54cd6a9ee..d77c68b14de0 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 @@ -175,6 +175,7 @@ "Setting": { "type": "object", "description": "Represents a security setting in Azure Security Center.", + "properties": {}, "allOf": [ { "$ref": "#/definitions/SettingResource" From d2f4ab07caf7d3fca8958461cfe367dbe212fc5c Mon Sep 17 00:00:00 2001 From: Tal Klein Date: Sat, 2 May 2020 11:49:13 +0300 Subject: [PATCH 8/8] deleting another readonly property from the example --- .../2019-01-01/examples/Settings/UpdateSetting_example.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json index af3dc01be6de..f0f251081910 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json @@ -4,7 +4,6 @@ "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "settingName": "MCAS", "setting": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", "kind": "DataExportSettings", "properties": { "enabled": true