Skip to content

Commit

Permalink
[PendingArmReview] Fixed Settings API (Azure#9227)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
taklei authored and 00Kai0 committed Oct 12, 2020
1 parent b57516e commit 971b53c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"kind": "DataExportSettings",
"properties": {
"enabled": true
}
Expand All @@ -18,7 +15,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,16 @@
"Setting": {
"type": "object",
"description": "Represents a security setting in Azure Security Center.",
"discriminator": "kind",
"properties": {},
"allOf": [
{
"$ref": "#/definitions/SettingResource"
}
]
},
"DataExportSetting": {
"DataExportSettings": {
"type": "object",
"description": "Represents a data export setting",
"x-ms-discriminator-value": "DataExportSetting",
"properties": {
"properties": {
"x-ms-client-flatten": true,
Expand All @@ -198,25 +196,27 @@
{
"$ref": "#/definitions/Setting"
}
]
],
"x-ms-discriminator-value": "DataExportSettings"
},
"SettingResource": {
"type": "object",
"description": "The kind of the security setting",
"additionalProperties": true,
"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": {
"name": "SettingKind",
"modelAsString": true,
"values": [
{
"value": "DataExportSetting"
"value": "DataExportSettings"
},
{
"value": "AlertSuppressionSetting"
Expand All @@ -225,6 +225,7 @@
}
}
},
"discriminator": "kind",
"required": [
"kind"
],
Expand Down

0 comments on commit 971b53c

Please sign in to comment.