From 1e13e4321432db6f2746bc3460a3521f58769d33 Mon Sep 17 00:00:00 2001 From: Dhawal Jain <41853104+dhawal777@users.noreply.github.com> Date: Tue, 23 Feb 2021 04:48:35 +0530 Subject: [PATCH] RoundTrip additional property and object additional property S360 fix by adding defaults and renaming respectively (#12992) * Swagger correctness issue fix(Additional Property not allowed) * Added custom-word * Removing unused properrty * Ignored Tera * Reverting not related changes * RoundTrip additional property and object additional property S360 fix by adding defaults and renaming respectively * Removed default * Removing some default in older version * Fixed model validation errors and added few more defaults * Fixed Sementic errors * Lint fix --- cSpell.json | 12 ++++++ .../stable/2018-01-01/databox.json | 14 +++++-- .../2018-01-01/examples/JobsCreate.json | 5 +-- .../stable/2018-01-01/examples/JobsGet2.json | 5 +-- .../stable/2018-01-01/examples/JobsGet3.json | 5 +-- .../stable/2018-01-01/examples/JobsGet4.json | 5 +-- .../stable/2018-01-01/examples/JobsGet5.json | 5 +-- .../stable/2019-09-01/databox.json | 19 ++++++---- .../stable/2020-04-01/databox.json | 37 ++++++++++++------- .../stable/2020-11-01/databox.json | 30 ++++++++++----- 10 files changed, 81 insertions(+), 56 deletions(-) diff --git a/cSpell.json b/cSpell.json index b42e9bfcd873..b849bd092288 100644 --- a/cSpell.json +++ b/cSpell.json @@ -45,6 +45,18 @@ "Tera" ] }, + { + "filename": "**/specification/databox/resource-manager/Microsoft.DataBox/stable/2019-09-01/databox.json", + "words": [ + "Tera" + ] + }, + { + "filename": "**/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-04-01/databox.json", + "words": [ + "Tera" + ] + }, { "filename": "**/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-11-01/databox.json", "words": [ diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/databox.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/databox.json index 4a5c289f87f6..5520d404b83b 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/databox.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/databox.json @@ -863,6 +863,9 @@ }, "CopyLogDetails": { "description": "Details for log generated during copy.", + "required": [ + "copyLogDetailsType" + ], "type": "object", "properties": { "copyLogDetailsType": { @@ -873,7 +876,6 @@ "DataBoxHeavy" ], "type": "string", - "readOnly": true, "x-ms-enum": { "name": "ClassDiscriminator", "modelAsExtensible": false, @@ -1777,6 +1779,9 @@ }, "JobSecrets": { "description": "The base class for the secrets", + "required": [ + "jobSecretsType" + ], "type": "object", "properties": { "jobSecretsType": { @@ -1787,7 +1792,6 @@ "DataBoxHeavy" ], "type": "string", - "readOnly": true, "x-ms-enum": { "name": "ClassDiscriminator", "modelAsExtensible": false, @@ -2018,7 +2022,8 @@ }, "sendNotification": { "description": "Notification is required or not.", - "type": "boolean" + "type": "boolean", + "default": true } } }, @@ -2359,7 +2364,8 @@ "description": "Commercial Address." } ] - } + }, + "default": "None" } } }, diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsCreate.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsCreate.json index 7aecaf824e8c..15419db73bfd 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsCreate.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsCreate.json @@ -44,11 +44,8 @@ }, "destinationAccountDetails": [ { + "dataDestinationType": "StorageAccount", "storageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount" - }, - { - "stagingStorageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount", - "resourceGroupId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt" } ] } diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet2.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet2.json index 93e257f4622a..f775be0924c5 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet2.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet2.json @@ -133,11 +133,8 @@ }, "destinationAccountDetails": [ { + "dataDestinationType": "StorageAccount", "storageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount" - }, - { - "stagingStorageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount", - "resourceGroupId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt" } ], "errorDetails": [], diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet3.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet3.json index 18711c0a4618..6b9df951c043 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet3.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet3.json @@ -133,11 +133,8 @@ }, "destinationAccountDetails": [ { + "dataDestinationType": "StorageAccount", "storageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount" - }, - { - "stagingStorageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount", - "resourceGroupId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt" } ], "errorDetails": [], diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet4.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet4.json index 331fe0fea23d..2d5d43a5d4df 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet4.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet4.json @@ -104,11 +104,8 @@ }, "destinationAccountDetails": [ { + "dataDestinationType": "StorageAccount", "storageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount" - }, - { - "stagingStorageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount", - "resourceGroupId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt" } ], "errorDetails": [], diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet5.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet5.json index 659ae9d83f67..06e062051226 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet5.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2018-01-01/examples/JobsGet5.json @@ -76,11 +76,8 @@ }, "destinationAccountDetails": [ { + "dataDestinationType": "StorageAccount", "storageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount" - }, - { - "stagingStorageAccountId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount", - "resourceGroupId": "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt" } ], "errorDetails": [], diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2019-09-01/databox.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2019-09-01/databox.json index 0afe370058b6..3a6efd29efd5 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2019-09-01/databox.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2019-09-01/databox.json @@ -1924,11 +1924,11 @@ "description": "Dc Access Security code for device.", "type": "object", "properties": { - "forwardDcAccessCode": { + "forwardDCAccessCode": { "description": "Dc Access Code for dispatching from DC.", "type": "string" }, - "reverseDcAccessCode": { + "reverseDCAccessCode": { "description": "Dc Access code for dropping off at DC.", "type": "string" } @@ -2038,7 +2038,7 @@ "DiskScheduleAvailabilityRequest": { "description": "Request body to get the availability for scheduling disk orders.", "required": [ - "expectedDataSizeInTerabytes", + "expectedDataSizeInTeraBytes", "storageLocation", "skuName" ], @@ -2049,7 +2049,7 @@ } ], "properties": { - "expectedDataSizeInTerabytes": { + "expectedDataSizeInTeraBytes": { "format": "int32", "description": "The expected size of the data, which needs to be transferred in this job, in terabytes.", "type": "integer" @@ -2125,7 +2125,7 @@ ], "type": "object", "properties": { - "expectedDataSizeInTerabytes": { + "expectedDataSizeInTeraBytes": { "format": "int32", "description": "The expected size of the data, which needs to be transferred in this job, in terabytes.", "type": "integer" @@ -2402,7 +2402,8 @@ "description": "Scheduled job." } ] - } + }, + "default": "NonScheduled" }, "deliveryInfo": { "$ref": "#/definitions/JobDeliveryInfo", @@ -2748,7 +2749,8 @@ }, "sendNotification": { "description": "Notification is required or not.", - "type": "boolean" + "type": "boolean", + "default": true } } }, @@ -3271,7 +3273,8 @@ "description": "Commercial Address." } ] - } + }, + "default": "None" } } }, diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-04-01/databox.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-04-01/databox.json index 93a9fd590650..4d970746a96b 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-04-01/databox.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-04-01/databox.json @@ -1903,7 +1903,8 @@ }, "devicePassword": { "description": "Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\\-$%^!+=;:_()]+", - "type": "string" + "type": "string", + "x-ms-secret": true } }, "x-ms-discriminator-value": "DataBoxHeavy" @@ -1988,7 +1989,8 @@ }, "devicePassword": { "description": "Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\\-$%^!+=;:_()]+", - "type": "string" + "type": "string", + "x-ms-secret": true } }, "x-ms-discriminator-value": "DataBox" @@ -2096,7 +2098,8 @@ "description": "Verbose logging (includes Errors, CRC, size information and others)." } ] - } + }, + "default": "Error" }, "accountDetails": { "$ref": "#/definitions/DataAccountDetails", @@ -2260,11 +2263,11 @@ "description": "Dc access security code", "type": "object", "properties": { - "reverseDcAccessCode": { + "reverseDCAccessCode": { "description": "Reverse Dc access security code.", "type": "string" }, - "forwardDcAccessCode": { + "forwardDCAccessCode": { "description": "Forward Dc access security code.", "type": "string" } @@ -2290,7 +2293,7 @@ "required": [ "storageLocation", "skuName", - "expectedDataSizeInTerabytes" + "expectedDataSizeInTeraBytes" ], "type": "object", "allOf": [ @@ -2299,7 +2302,7 @@ } ], "properties": { - "expectedDataSizeInTerabytes": { + "expectedDataSizeInTeraBytes": { "format": "int32", "description": "The expected size of the data, which needs to be transferred in this job, in terabytes.", "type": "integer" @@ -2511,7 +2514,7 @@ "description": "Details about which key encryption type is being used.", "readOnly": true }, - "expectedDataSizeInTerabytes": { + "expectedDataSizeInTeraBytes": { "format": "int32", "description": "The expected size of the data, which needs to be transferred in this job, in terabytes.", "type": "integer" @@ -2701,7 +2704,8 @@ "description": "Scheduled job." } ] - } + }, + "default": "NonScheduled" }, "deliveryInfo": { "$ref": "#/definitions/JobDeliveryInfo", @@ -3034,7 +3038,8 @@ "description": "Key encryption key is managed by the Customer." } ] - } + }, + "default": "MicrosoftManaged" }, "kekUrl": { "description": "Key encryption key. It is required in case of Customer managed KekType.", @@ -3123,7 +3128,8 @@ }, "sendNotification": { "description": "Notification is required or not.", - "type": "boolean" + "type": "boolean", + "default": true } } }, @@ -3678,7 +3684,8 @@ "description": "Commercial Address." } ] - } + }, + "default": "None" } } }, @@ -4097,7 +4104,8 @@ "description": "Azure Managed disk storage." } ] - } + }, + "default": "StorageAccount" }, "transferAllBlobs": { "description": "To indicate if all Azure blobs have to be transferred", @@ -4187,7 +4195,8 @@ "description": "Azure Managed disk storage." } ] - } + }, + "default": "StorageAccount" }, "blobFilterDetails": { "$ref": "#/definitions/BlobFilterDetails", diff --git a/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-11-01/databox.json b/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-11-01/databox.json index d1764028a4ae..24f55ffbaef2 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-11-01/databox.json +++ b/specification/databox/resource-manager/Microsoft.DataBox/stable/2020-11-01/databox.json @@ -1614,7 +1614,8 @@ "description": "Azure Managed disk storage." } ] - } + }, + "default": "StorageAccount" }, "sharePassword": { "description": "Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\\-$%^!+=;:_()]+", @@ -2105,7 +2106,8 @@ "description": "Verbose logging (includes Errors, CRC, size information and others)." } ] - } + }, + "default": "Error" }, "accountDetails": { "$ref": "#/definitions/DataAccountDetails", @@ -2356,7 +2358,8 @@ "description": "Software-based encryption is disabled." } ] - } + }, + "default": "Disabled" } } }, @@ -2751,7 +2754,8 @@ "description": "Scheduled job." } ] - } + }, + "default": "NonScheduled" }, "deliveryInfo": { "$ref": "#/definitions/JobDeliveryInfo", @@ -3084,7 +3088,8 @@ "description": "Key encryption key is managed by the Customer." } ] - } + }, + "default": "MicrosoftManaged" }, "identityProperties": { "$ref": "#/definitions/IdentityProperties", @@ -3177,7 +3182,8 @@ }, "sendNotification": { "description": "Notification is required or not.", - "type": "boolean" + "type": "boolean", + "default": true } } }, @@ -3459,7 +3465,8 @@ "properties": { "type": { "description": "Identity type", - "type": "string" + "type": "string", + "default": "None" }, "principalId": { "description": "Service Principal Id backing the Msi", @@ -3742,7 +3749,8 @@ "description": "Commercial Address." } ] - } + }, + "default": "None" } } }, @@ -4161,7 +4169,8 @@ "description": "Azure Managed disk storage." } ] - } + }, + "default": "StorageAccount" }, "transferAllBlobs": { "description": "To indicate if all Azure blobs have to be transferred", @@ -4251,7 +4260,8 @@ "description": "Azure Managed disk storage." } ] - } + }, + "default": "StorageAccount" }, "blobFilterDetails": { "$ref": "#/definitions/BlobFilterDetails",