Skip to content

Commit

Permalink
RoundTrip additional property and object additional property S360 fix…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
dhawal777 authored Feb 22, 2021
1 parent 45c7ae9 commit 3cf56bc
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 56 deletions.
12 changes: 12 additions & 0 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,9 @@
},
"CopyLogDetails": {
"description": "Details for log generated during copy.",
"required": [
"copyLogDetailsType"
],
"type": "object",
"properties": {
"copyLogDetailsType": {
Expand All @@ -873,7 +876,6 @@
"DataBoxHeavy"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "ClassDiscriminator",
"modelAsExtensible": false,
Expand Down Expand Up @@ -1777,6 +1779,9 @@
},
"JobSecrets": {
"description": "The base class for the secrets",
"required": [
"jobSecretsType"
],
"type": "object",
"properties": {
"jobSecretsType": {
Expand All @@ -1787,7 +1792,6 @@
"DataBoxHeavy"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "ClassDiscriminator",
"modelAsExtensible": false,
Expand Down Expand Up @@ -2018,7 +2022,8 @@
},
"sendNotification": {
"description": "Notification is required or not.",
"type": "boolean"
"type": "boolean",
"default": true
}
}
},
Expand Down Expand Up @@ -2359,7 +2364,8 @@
"description": "Commercial Address."
}
]
}
},
"default": "None"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -2038,7 +2038,7 @@
"DiskScheduleAvailabilityRequest": {
"description": "Request body to get the availability for scheduling disk orders.",
"required": [
"expectedDataSizeInTerabytes",
"expectedDataSizeInTeraBytes",
"storageLocation",
"skuName"
],
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -2402,7 +2402,8 @@
"description": "Scheduled job."
}
]
}
},
"default": "NonScheduled"
},
"deliveryInfo": {
"$ref": "#/definitions/JobDeliveryInfo",
Expand Down Expand Up @@ -2748,7 +2749,8 @@
},
"sendNotification": {
"description": "Notification is required or not.",
"type": "boolean"
"type": "boolean",
"default": true
}
}
},
Expand Down Expand Up @@ -3271,7 +3273,8 @@
"description": "Commercial Address."
}
]
}
},
"default": "None"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -2096,7 +2098,8 @@
"description": "Verbose logging (includes Errors, CRC, size information and others)."
}
]
}
},
"default": "Error"
},
"accountDetails": {
"$ref": "#/definitions/DataAccountDetails",
Expand Down Expand Up @@ -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"
}
Expand All @@ -2290,7 +2293,7 @@
"required": [
"storageLocation",
"skuName",
"expectedDataSizeInTerabytes"
"expectedDataSizeInTeraBytes"
],
"type": "object",
"allOf": [
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -2701,7 +2704,8 @@
"description": "Scheduled job."
}
]
}
},
"default": "NonScheduled"
},
"deliveryInfo": {
"$ref": "#/definitions/JobDeliveryInfo",
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -3123,7 +3128,8 @@
},
"sendNotification": {
"description": "Notification is required or not.",
"type": "boolean"
"type": "boolean",
"default": true
}
}
},
Expand Down Expand Up @@ -3678,7 +3684,8 @@
"description": "Commercial Address."
}
]
}
},
"default": "None"
}
}
},
Expand Down Expand Up @@ -4097,7 +4104,8 @@
"description": "Azure Managed disk storage."
}
]
}
},
"default": "StorageAccount"
},
"transferAllBlobs": {
"description": "To indicate if all Azure blobs have to be transferred",
Expand Down Expand Up @@ -4187,7 +4195,8 @@
"description": "Azure Managed disk storage."
}
]
}
},
"default": "StorageAccount"
},
"blobFilterDetails": {
"$ref": "#/definitions/BlobFilterDetails",
Expand Down
Loading

0 comments on commit 3cf56bc

Please sign in to comment.