From 1ccd4d2c4271621f417951b9cf04ef9d5b486fcf Mon Sep 17 00:00:00 2001 From: Braden Watkins Date: Mon, 4 Jan 2021 11:03:31 -0800 Subject: [PATCH 1/3] Added new move product validation error codes --- .../preview/2019-10-01-preview/billing.json | 24 ++++++++++++++----- .../stable/2020-05-01/billing.json | 24 ++++++++++++++----- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index f9c58116ddc2..9a3adfa6b42a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -6214,14 +6214,26 @@ "type": "string", "description": "Error code of the transfer validation response.", "enum": [ + "BillingAccountInactive", + "CrossBillingAccountNotAllowed", + "DestinationBillingProfileInactive", + "DestinationBillingProfileNotFound", + "DestinationBillingProfilePastDue", + "DestinationInvoiceSectionInactive", + "DestinationInvoiceSectionNotFound", + "InsufficientPermissionOnDestination", + "InsufficientPermissionOnSource", + "InvalidDestination", "InvalidSource", + "MarketplaceNotEnabledOnDestination", + "NotAvailableForDestinationMarket", + "ProductInactive", + "ProductNotFound", + "ProductTypeNotSupported", + "SourceBillingProfilePastDue", + "SourceInvoiceSectionInactive", "SubscriptionNotActive", - "InsufficientPermissionOnSource", - "InsufficientPermissionOnDestination", - "DestinationBillingProfilePastDue", - "SubscriptionTypeNotSupported", - "CrossBillingAccountNotAllowed", - "NotAvailableForDestinationMarket" + "SubscriptionTypeNotSupported" ], "x-ms-enum": { "name": "subscriptionTransferValidationErrorCode", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index ede1bac4407f..6bfa342db53d 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -3719,14 +3719,26 @@ "type": "string", "description": "Error code of the transfer validation response.", "enum": [ + "BillingAccountInactive", + "CrossBillingAccountNotAllowed", + "DestinationBillingProfileInactive", + "DestinationBillingProfileNotFound", + "DestinationBillingProfilePastDue", + "DestinationInvoiceSectionInactive", + "DestinationInvoiceSectionNotFound", + "InsufficientPermissionOnDestination", + "InsufficientPermissionOnSource", + "InvalidDestination", "InvalidSource", + "MarketplaceNotEnabledOnDestination", + "NotAvailableForDestinationMarket", + "ProductInactive", + "ProductNotFound", + "ProductTypeNotSupported", + "SourceBillingProfilePastDue", + "SourceInvoiceSectionInactive", "SubscriptionNotActive", - "InsufficientPermissionOnSource", - "InsufficientPermissionOnDestination", - "DestinationBillingProfilePastDue", - "SubscriptionTypeNotSupported", - "CrossBillingAccountNotAllowed", - "NotAvailableForDestinationMarket" + "SubscriptionTypeNotSupported" ], "x-ms-enum": { "name": "subscriptionTransferValidationErrorCode", From a857e07ad5c3f028ba86e4c3009078f4a4351e5d Mon Sep 17 00:00:00 2001 From: Braden Watkins Date: Mon, 4 Jan 2021 15:02:18 -0800 Subject: [PATCH 2/3] Added integer formats to fix S360 swagger lint validation --- .../preview/2017-02-27-preview/billing.json | 1 + .../preview/2017-04-24-preview/billing.json | 2 ++ .../preview/2018-03-01-preview/billing.json | 2 ++ .../preview/2018-03-01-preview/billingV2.json | 1 + .../preview/2018-11-01-preview/billing.json | 17 ++++++++++++----- .../preview/2019-10-01-preview/billing.json | 14 ++++++++++---- .../stable/2020-05-01/billing.json | 14 ++++++++++---- 7 files changed, 38 insertions(+), 13 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2017-02-27-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2017-02-27-preview/billing.json index 2c4eb5b3c615..f1c71e36e416 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2017-02-27-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2017-02-27-preview/billing.json @@ -83,6 +83,7 @@ "in": "query", "required": false, "type": "integer", + "format": "int32", "minimum": 1, "maximum": 100 }, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2017-04-24-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2017-04-24-preview/billing.json index 1c492d43ed9a..6cab0f6966f3 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2017-04-24-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2017-04-24-preview/billing.json @@ -76,6 +76,7 @@ "in": "query", "required": false, "type": "integer", + "format": "int32", "minimum": 1, "maximum": 100 } @@ -194,6 +195,7 @@ "in": "query", "required": false, "type": "integer", + "format": "int32", "minimum": 1, "maximum": 100 } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index e4964c2f9473..4b41b668a6fa 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -134,6 +134,7 @@ "in": "query", "required": false, "type": "integer", + "format": "int32", "minimum": 1, "maximum": 100 } @@ -252,6 +253,7 @@ "in": "query", "required": false, "type": "integer", + "format": "int32", "minimum": 1, "maximum": 100 } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingV2.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingV2.json index a4b03809ce4f..d1416fe7d160 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingV2.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingV2.json @@ -134,6 +134,7 @@ "in": "query", "required": false, "type": "integer", + "format": "int32", "minimum": 1, "maximum": 100 } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json index 4c0327656ae6..66eb7f58f81a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json @@ -421,7 +421,8 @@ }, "Retry-After": { "description": "Recommends the retryable time after receiving this.", - "type": "integer" + "type": "integer", + "format": "int32" }, "Azure-AsyncOperation": { "description": "URI to poll for the operation status", @@ -736,7 +737,8 @@ }, "Retry-After": { "description": "Recommends the retryable time after receiving this.", - "type": "integer" + "type": "integer", + "format": "int32" }, "Azure-AsyncOperation": { "description": "URI to poll for the operation status", @@ -1713,7 +1715,8 @@ }, "Retry-After": { "description": "Recommends the retryable time after receiving this.", - "type": "integer" + "type": "integer", + "format": "int32" }, "Azure-AsyncOperation": { "description": "URI to poll for the operation status", @@ -1975,7 +1978,8 @@ }, "Retry-After": { "description": "Recommends the retryable time after receiving this.", - "type": "integer" + "type": "integer", + "format": "int32" }, "Azure-AsyncOperation": { "description": "URI to poll for the operation status", @@ -3938,7 +3942,8 @@ }, "Retry-After": { "description": "Recommends the retryable time after receiving this.", - "type": "integer" + "type": "integer", + "format": "int32" }, "Azure-AsyncOperation": { "description": "URI to poll for the operation status", @@ -4953,6 +4958,7 @@ "invoiceDay": { "description": "Invoice day.", "type": "integer", + "format": "int32", "readOnly": true }, "currency": { @@ -5869,6 +5875,7 @@ "quantity": { "description": "Purchase quantity.", "type": "integer", + "format": "int32", "readOnly": true }, "customerId": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 9a3adfa6b42a..60c2cfe218a5 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -687,7 +687,8 @@ }, "Retry-After": { "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, @@ -947,7 +948,8 @@ }, "Retry-After": { "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, @@ -2479,7 +2481,8 @@ }, "Retry-After": { "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, @@ -2746,7 +2749,8 @@ }, "Retry-After": { "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, @@ -6878,6 +6882,7 @@ "invoiceDay": { "description": "The day of the month when the invoice for the billing profile is generated.", "type": "integer", + "format": "int32", "readOnly": true }, "currency": { @@ -8069,6 +8074,7 @@ "quantity": { "description": "The quantity purchased in the transaction.", "type": "integer", + "format": "int32", "readOnly": true }, "invoiceSectionId": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index 6bfa342db53d..347535b39c42 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -588,7 +588,8 @@ }, "Retry-After": { "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, @@ -800,7 +801,8 @@ }, "Retry-After": { "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, @@ -1905,7 +1907,8 @@ }, "Retry-After": { "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, @@ -2264,7 +2267,8 @@ }, "Retry-After": { "description": "Recommended time to wait before making another request to check the status of the operation. The time is specified in seconds.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, @@ -4358,6 +4362,7 @@ "invoiceDay": { "description": "The day of the month when the invoice for the billing profile is generated.", "type": "integer", + "format": "int32", "readOnly": true }, "currency": { @@ -5653,6 +5658,7 @@ "quantity": { "description": "The quantity purchased in the transaction.", "type": "integer", + "format": "int32", "readOnly": true }, "invoiceSectionId": { From b22cbd82c1fe79a67305ec6eee4650f077d22975 Mon Sep 17 00:00:00 2001 From: Braden Watkins Date: Mon, 4 Jan 2021 15:25:41 -0800 Subject: [PATCH 3/3] Fixed ModelValidation errors for v2018-11-01-preview --- .../preview/2018-11-01-preview/examples/AcceptTransfer.json | 2 +- .../preview/2018-11-01-preview/examples/InitiateTransfer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AcceptTransfer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AcceptTransfer.json index d3f4fe1e1d84..c6df165b4fbf 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AcceptTransfer.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/AcceptTransfer.json @@ -4,7 +4,7 @@ "transferName": "transferName", "body": { "properties": { - "value": [ + "productDetails": [ { "productType": "AzureSubscription", "productId": "subscriptionId" diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/InitiateTransfer.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/InitiateTransfer.json index e6a3860f3736..ee0a7fbca59a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/InitiateTransfer.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/InitiateTransfer.json @@ -5,7 +5,7 @@ "invoiceSectionName": "invoiceSectionName", "body": { "properties": { - "billingProfileName": "billingProfileName", + "billingProfileId": "billingProfileId", "recipientEmailId": "user@contoso.com" } }