Skip to content

Commit 971b53c

Browse files
taklei00Kai0
authored andcommitted
[PendingArmReview] Fixed Settings API (Azure#9227)
* fixed settings api. changed the dataexportsetting parameter name and the discriminator place * deleted propersties * ran prettier fix * fixed update test and added properties in Settings definition * deleting additionalproperties because of autorest errors * adding back additionalProperties * deleting a readonly property from the example * deleting another readonly property from the example
1 parent b57516e commit 971b53c

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSetting_example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"body": {
1010
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS",
1111
"name": "MCAS",
12-
"kind": "DataExportSetting",
12+
"kind": "DataExportSettings",
1313
"type": "Microsoft.Security/settings",
1414
"properties": {
1515
"enabled": true

specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSettings_example.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS",
1212
"name": "MCAS",
13-
"kind": "DataExportSetting",
13+
"kind": "DataExportSettings",
1414
"type": "Microsoft.Security/settings",
1515
"properties": {
1616
"enabled": true
@@ -19,7 +19,7 @@
1919
{
2020
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP",
2121
"name": "WDATP",
22-
"kind": "DataExportSetting",
22+
"kind": "DataExportSettings",
2323
"type": "Microsoft.Security/settings",
2424
"properties": {
2525
"enabled": false

specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
55
"settingName": "MCAS",
66
"setting": {
7-
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS",
8-
"name": "MCAS",
9-
"kind": "DataExportSetting",
10-
"type": "Microsoft.Security/settings",
7+
"kind": "DataExportSettings",
118
"properties": {
129
"enabled": true
1310
}
@@ -18,7 +15,7 @@
1815
"body": {
1916
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS",
2017
"name": "MCAS",
21-
"kind": "DataExportSetting",
18+
"kind": "DataExportSettings",
2219
"type": "Microsoft.Security/settings",
2320
"properties": {
2421
"enabled": true

specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/settings.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,16 @@
175175
"Setting": {
176176
"type": "object",
177177
"description": "Represents a security setting in Azure Security Center.",
178-
"discriminator": "kind",
179178
"properties": {},
180179
"allOf": [
181180
{
182181
"$ref": "#/definitions/SettingResource"
183182
}
184183
]
185184
},
186-
"DataExportSetting": {
185+
"DataExportSettings": {
187186
"type": "object",
188187
"description": "Represents a data export setting",
189-
"x-ms-discriminator-value": "DataExportSetting",
190188
"properties": {
191189
"properties": {
192190
"x-ms-client-flatten": true,
@@ -198,25 +196,27 @@
198196
{
199197
"$ref": "#/definitions/Setting"
200198
}
201-
]
199+
],
200+
"x-ms-discriminator-value": "DataExportSettings"
202201
},
203202
"SettingResource": {
204203
"type": "object",
205204
"description": "The kind of the security setting",
205+
"additionalProperties": true,
206206
"properties": {
207207
"kind": {
208208
"type": "string",
209-
"description": "the kind of the settings string (DataExportSetting)",
209+
"description": "the kind of the settings string (DataExportSettings)",
210210
"enum": [
211-
"DataExportSetting",
211+
"DataExportSettings",
212212
"AlertSuppressionSetting"
213213
],
214214
"x-ms-enum": {
215215
"name": "SettingKind",
216216
"modelAsString": true,
217217
"values": [
218218
{
219-
"value": "DataExportSetting"
219+
"value": "DataExportSettings"
220220
},
221221
{
222222
"value": "AlertSuppressionSetting"
@@ -225,6 +225,7 @@
225225
}
226226
}
227227
},
228+
"discriminator": "kind",
228229
"required": [
229230
"kind"
230231
],

0 commit comments

Comments
 (0)