From 04ecc20cdeeb7985a77d3c5c73f015f8c23bf4fc Mon Sep 17 00:00:00 2001 From: rishi Date: Fri, 25 Jun 2021 13:04:15 -0700 Subject: [PATCH 01/24] Adding 2020-09-Preview same as 11-preview --- .../2020-09-01-preview/billingPromotions.json | 454 ++++++++++++++++++ .../examples/GetPromotions.json | 27 ++ .../examples/PromotionActivation.json | 36 ++ .../examples/PromotionCheckEligibility.json | 21 + .../examples/PromotionDetails.json | 26 + .../billing/resource-manager/readme.md | 11 + 6 files changed, 575 insertions(+) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/GetPromotions.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionActivation.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionDetails.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json new file mode 100644 index 000000000000..acb7f21318a3 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -0,0 +1,454 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-09-01-preview", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/promotions/{promotionId}": { + "put": { + "summary": "Activate promotion", + "description": "Activate promotion and create promotion resource.", + "operationId": "Activate_Promotion", + "x-ms-examples": { + "PromotionActivation": { + "$ref": "./examples/PromotionActivation.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/promotionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PromotionCreateRequest" + }, + "description": "Request parameters that are provided to activate the promotion." + } + ], + "tags": [ + "Promotion, Activate" + ], + "responses": { + "200": { + "description": "The resource has been created", + "schema": { + "$ref": "#/definitions/PromotionResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "summary": "Get a specific Promotion.", + "description": "Get the details of the `Promotion`.", + "operationId": "Promotion_Get", + "x-ms-examples": { + "GetPromotion": { + "$ref": "./examples/PromotionDetails.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/promotionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "tags": [ + "Promotion" + ], + "responses": { + "200": { + "description": "Details of the `Promotion`.", + "schema": { + "$ref": "#/definitions/PromotionResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/promotions": { + "get": { + "summary": "Get all `Promotion`s.", + "description": "List of all the `Promotion`s that the user has access.", + "operationId": "Promotions_List", + "x-ms-examples": { + "PromotionList": { + "$ref": "./examples/GetPromotions.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "tags": [ + "Promotion" + ], + "responses": { + "200": { + "description": "List of `Promotion`s", + "schema": { + "$ref": "#/definitions/PromotionList" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/promotions/{promotionSkuId}/checkEligibility": { + "get": { + "tags": [ + "Promotion_CheckEligibility" + ], + "operationId": "Promotion_CheckEligibility", + "description": "Checks the eligibility of a subscription for all active promotions.", + "x-ms-examples": { + "PromotionCheckEligibility": { + "$ref": "./examples/PromotionCheckEligibility.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/promotionSkuId" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/PromotionCheckEligibilityResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "PromotionCreateRequest": { + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "sku": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PromotionCreateSkuNameRequestProperties" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PromotionCreateRequestProperties" + } + } + }, + "PromotionCreateSkuNameRequestProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "SKU Name of the promotion to activate" + } + } + }, + "PromotionCreateRequestProperties": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Friendly name for user to easily identified the promotion." + }, + "appliedScopes": { + "$ref": "#/definitions/AppliedScopes", + "description": "List of subscriptions getting the benefit of the promotion." + }, + "orderId": { + "type": "string", + "description": "Unique Id for the promotion order." + } + } + }, + "PromotionList": { + "description": "The list of promotions.", + "properties": { + "value": { + "description": "The list of promotions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/PromotionResponse" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "PromotionResponse": { + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "etag": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Identifier of the promotion" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the promotion" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PromotionResponseProperties" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Type of resource. \"Microsoft.Billing/Promotions\"" + } + } + }, + "PromotionResponseProperties": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Friendly name for user to easily identified the promotion." + }, + "effectiveDateTime": { + "type": "string", + "format": "date-time", + "description": "This is the DateTime when the promotion would come in effect" + }, + "lastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "Last update time of the promotion resource." + }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "This is the date when the Reservation will expire." + }, + "provisioningState": { + "type": "string", + "description": "Current state of the promotion." + }, + "appliedScopes": { + "$ref": "#/definitions/AppliedScopes", + "description": "List of subscriptions getting the benefit of the promotion." + } + } + }, + "AppliedScopes": { + "type": "array", + "description": "List of the subscriptions that the benefit will be applied.", + "items": { + "type": "string", + "minItems": 1, + "maxItems": 1 + } + }, + "PromotionCheckEligibilityResponse": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PromotionCheckEligibilityResponseProperties" + } + } + }, + "PromotionCheckEligibilityResponseProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Name of the promotion" + }, + "name": { + "type": "string", + "description": "Name of the promotion" + }, + "eligible": { + "type": "boolean", + "description": "Specifies whether the subscription is eligible for the promotion" + }, + "reason": { + "type": "string", + "description": "Reason in case the subscription is not eligible for promotion." + }, + "eligibilitySubscriptionId": { + "type": "string", + "description": "Subscription Id on which the eligibility check was performed." + }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "Date till when the promotion is available." + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "The sub details of the error.", + "readOnly": true, + "$ref": "#/definitions/ErrorSubDetails" + } + } + }, + "ErrorSubDetails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The version of the API to be used with the client request. The current version is 2019-10-01-preview." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The ID that uniquely identifies an Azure subscription.", + "required": true, + "type": "string" + }, + "promotionIdParameter": { + "name": "promotionId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Promotion Id" + }, + "promotionSkuId": { + "name": "promotionSkuId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Promotion Sku Id" + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/GetPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/GetPromotions.json new file mode 100644 index 000000000000..aacde5064a35 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/GetPromotions.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2020-09-01-preview" + }, + "responses": { + "200": { + "body": [ + { + "id": "/providers/Microsoft.Billing/promotions/105363ba-c9e4-421e-a630-4968bdc3f217", + "type": "Microsoft.Billing/promotions", + "name": "105363ba-c9e4-421e-a630-4968bdc3f217", + "etag": 1, + "properties": { + "appliedScopes": [ + "/subscriptions/a4f60096-7846-4c87-9143-771e73ae26ce" + ], + "provisioningState": "Creating", + "displayName": "test-promo1", + "effectiveDateTime": "2020-10-19T21:03:19.9905904Z", + "lastUpdatedDateTime": "2020-10-19T21:03:19.9905904Z", + "expiryDate": "2021-01-31" + } + } + ] + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionActivation.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionActivation.json new file mode 100644 index 000000000000..764d4c7d6818 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionActivation.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2020-09-01-preview", + "promotionId": "ff0f1add-122a-43c1-a2ec-c2277781667d", + "parameters": { + "sku": { + "name": "wvd_promo_30p" + }, + "properties": { + "appliedScopes": [ + "/subscriptions/f6dc64c8-34bb-43d3-96b0-fd2b8c94f1c3" + ], + "displayName": "promotion-displayname", + "orderId": "ff0f1add-122a-43c1-a2ec-c2277781667d" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/promotions/ff0f1add-122a-43c1-a2ec-c2277781667d", + "type": "Microsoft.Billing/promotions", + "name": "ff0f1add-122a-43c1-a2ec-c2277781667d", + "properties": { + "appliedScopes": [ + "/subscriptions/a4f60096-7846-4c87-9143-771e73ae26ce" + ], + "provisioningState": "Succeeded", + "expiryDate": "2021-02-01", + "displayName": "promotion-displayname", + "effectiveDateTime": "2020-11-03T02:26:53.0006733Z" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json new file mode 100644 index 000000000000..b6fd54b05579 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2020-09-01-preview", + "promotionSkuId": "wvd_promo_30p", + "subscriptionId": "f6dc64c8-34bb-43d3-96b0-fd2b8c94f1c3" + }, + "responses": { + "200": { + "body": { + "properties": { + "id": "wvd_promo_30p", + "name": "WVD 30 percent off", + "eligible": true, + "reason": "None", + "eligibilitySubscriptionId": "f6dc64c8-34bb-43d3-96b0-fd2b8c94f1c3", + "expiryDate": "2021-10-01" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionDetails.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionDetails.json new file mode 100644 index 000000000000..4a4e4829822f --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionDetails.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2020-09-01-preview", + "promotionId": "{promotionId}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/promotions/105363ba-c9e4-421e-a630-4968bdc3f217", + "type": "Microsoft.Billing/promotions", + "name": "105363ba-c9e4-421e-a630-4968bdc3f217", + "etag": 1, + "properties": { + "appliedScopes": [ + "/subscriptions/a4f60096-7846-4c87-9143-771e73ae26ce" + ], + "provisioningState": "Creating", + "displayName": "test-promo1", + "effectiveDateTime": "2020-10-19T21:03:19.9905904Z", + "lastUpdatedDateTime": "2020-10-19T21:03:19.9905904Z", + "expiryDate": "2020-10-19" + } + } + } + } +} diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 8cb5f3f3a9a5..83c64370e22e 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -38,6 +38,17 @@ input-file: - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2018-03-01-preview/billingV2.json ``` + +### Tag: package-2020-09-preview + +These settings apply only when `--tag=package-2020-09-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2020-09-preview' +input-file: +- Microsoft.Billing/stable/2020-05-01/billing.json +- Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +``` + ### Tag: package-2020-11-preview These settings apply only when `--tag=package-2020-11-preview` is specified on the command line. From bcfcd509a6ecd7c9a8425d7e3cce6f68052c3e3b Mon Sep 17 00:00:00 2001 From: rishi Date: Mon, 28 Jun 2021 09:28:50 -0700 Subject: [PATCH 02/24] fixing lint issue --- .../preview/2020-09-01-preview/billingPromotions.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index acb7f21318a3..cd1811516af3 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -216,6 +216,7 @@ } }, "PromotionList": { + "type": "object", "description": "The list of promotions.", "properties": { "value": { From d4d13d68e3052fffc381655651116832c7dcfbb5 Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 8 Jul 2021 08:59:26 -0700 Subject: [PATCH 03/24] fixing model --- .../preview/2020-09-01-preview/billingPromotions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index cd1811516af3..058e260cc759 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -216,7 +216,7 @@ } }, "PromotionList": { - "type": "object", + "type": "array", "description": "The list of promotions.", "properties": { "value": { From 5dd5a0b602ca8afeab9fdea031e917c2eddca868 Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 8 Jul 2021 09:28:19 -0700 Subject: [PATCH 04/24] fixing model --- .../2020-09-01-preview/billingPromotions.json | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index 058e260cc759..350132fad390 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -218,19 +218,11 @@ "PromotionList": { "type": "array", "description": "The list of promotions.", - "properties": { - "value": { - "description": "The list of promotions.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/PromotionResponse" - } - }, - "nextLink": { - "description": "The link (url) to the next page of results.", - "type": "string", - "readOnly": true + "items": { + "type": "object", + "properties": { + "$ref": "#/definitions/PromotionResponse", + "description": "Promotion properties." } } }, @@ -452,4 +444,4 @@ } } } -} +} \ No newline at end of file From 547ae5331b195548505f3b61d5f25df6c15bcdf7 Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 8 Jul 2021 09:34:12 -0700 Subject: [PATCH 05/24] fixing model --- .../2020-09-01-preview/billingPromotions.json | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index 350132fad390..05f45c8f83f9 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -216,13 +216,20 @@ } }, "PromotionList": { - "type": "array", "description": "The list of promotions.", - "items": { - "type": "object", - "properties": { - "$ref": "#/definitions/PromotionResponse", - "description": "Promotion properties." + "properties": { + "value": { + "description": "The list of promotions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/PromotionResponse" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true } } }, From 511b61cc13dd1bb7f35f8dbb4620c00db7c0a911 Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 8 Jul 2021 09:45:26 -0700 Subject: [PATCH 06/24] pretify fix --- .../preview/2020-09-01-preview/billingPromotions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index 05f45c8f83f9..acb7f21318a3 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -451,4 +451,4 @@ } } } -} \ No newline at end of file +} From 05b7ffc43eeb609bf28563678b10b207f46e3f90 Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 8 Jul 2021 23:05:41 -0700 Subject: [PATCH 07/24] fixing linting --- .../2020-09-01-preview/billingPromotions.json | 1 - .../examples/GetPromotions.json | 36 ++++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index acb7f21318a3..0449d232acfe 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -216,7 +216,6 @@ } }, "PromotionList": { - "description": "The list of promotions.", "properties": { "value": { "description": "The list of promotions.", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/GetPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/GetPromotions.json index aacde5064a35..6063a7926691 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/GetPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/GetPromotions.json @@ -4,24 +4,26 @@ }, "responses": { "200": { - "body": [ - { - "id": "/providers/Microsoft.Billing/promotions/105363ba-c9e4-421e-a630-4968bdc3f217", - "type": "Microsoft.Billing/promotions", - "name": "105363ba-c9e4-421e-a630-4968bdc3f217", - "etag": 1, - "properties": { - "appliedScopes": [ - "/subscriptions/a4f60096-7846-4c87-9143-771e73ae26ce" - ], - "provisioningState": "Creating", - "displayName": "test-promo1", - "effectiveDateTime": "2020-10-19T21:03:19.9905904Z", - "lastUpdatedDateTime": "2020-10-19T21:03:19.9905904Z", - "expiryDate": "2021-01-31" + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/promotions/105363ba-c9e4-421e-a630-4968bdc3f217", + "type": "Microsoft.Billing/promotions", + "name": "105363ba-c9e4-421e-a630-4968bdc3f217", + "etag": 1, + "properties": { + "appliedScopes": [ + "/subscriptions/a4f60096-7846-4c87-9143-771e73ae26ce" + ], + "provisioningState": "Creating", + "displayName": "test-promo1", + "effectiveDateTime": "2020-10-19T21:03:19.9905904Z", + "lastUpdatedDateTime": "2020-10-19T21:03:19.9905904Z", + "expiryDate": "2021-01-31" + } } - } - ] + ] + } } } } From 567b0ee9ff92540a6895f03fda03f4f43f63702a Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 8 Jul 2021 23:09:38 -0700 Subject: [PATCH 08/24] more linting fix --- .../preview/2020-09-01-preview/billingPromotions.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index 0449d232acfe..b0e4afadc220 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -216,6 +216,7 @@ } }, "PromotionList": { + "type": "object", "properties": { "value": { "description": "The list of promotions.", From 04154e5a11c67bb46fa2e64acde1019ec619e73f Mon Sep 17 00:00:00 2001 From: rishi Date: Wed, 4 Aug 2021 10:36:47 -0700 Subject: [PATCH 09/24] fixing swagger correctness --- .../preview/2020-09-01-preview/billingPromotions.json | 6 +++++- .../2020-09-01-preview/examples/PromotionActivation.json | 2 +- .../examples/PromotionCheckEligibility.json | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index b0e4afadc220..c04950dc4c18 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -47,7 +47,7 @@ "Promotion, Activate" ], "responses": { - "200": { + "202": { "description": "The resource has been created", "schema": { "$ref": "#/definitions/PromotionResponse" @@ -331,6 +331,10 @@ "type": "string", "description": "Reason in case the subscription is not eligible for promotion." }, + "details": { + "type": "string", + "description": "Details in case the subscription is not eligible for promotion." + }, "eligibilitySubscriptionId": { "type": "string", "description": "Subscription Id on which the eligibility check was performed." diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionActivation.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionActivation.json index 764d4c7d6818..1ecd651dad4e 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionActivation.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionActivation.json @@ -16,7 +16,7 @@ } }, "responses": { - "200": { + "202": { "body": { "id": "/providers/Microsoft.Billing/promotions/ff0f1add-122a-43c1-a2ec-c2277781667d", "type": "Microsoft.Billing/promotions", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json index b6fd54b05579..43526fa5852c 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json @@ -12,6 +12,7 @@ "name": "WVD 30 percent off", "eligible": true, "reason": "None", + "details": "", "eligibilitySubscriptionId": "f6dc64c8-34bb-43d3-96b0-fd2b8c94f1c3", "expiryDate": "2021-10-01" } From 76c3bcfc369d4b72d4d9085d52bf20fc6e024429 Mon Sep 17 00:00:00 2001 From: rishi Date: Tue, 9 Nov 2021 19:31:21 -0800 Subject: [PATCH 10/24] Fixing swagger --- .../2020-09-01-preview/billingPromotions.json | 58 ++++++++++--------- .../examples/PromotionCheckEligibility.json | 16 ++--- 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index c04950dc4c18..001444299212 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -315,34 +315,36 @@ "PromotionCheckEligibilityResponseProperties": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Name of the promotion" - }, - "name": { - "type": "string", - "description": "Name of the promotion" - }, - "eligible": { - "type": "boolean", - "description": "Specifies whether the subscription is eligible for the promotion" - }, - "reason": { - "type": "string", - "description": "Reason in case the subscription is not eligible for promotion." - }, - "details": { - "type": "string", - "description": "Details in case the subscription is not eligible for promotion." - }, - "eligibilitySubscriptionId": { - "type": "string", - "description": "Subscription Id on which the eligibility check was performed." - }, - "expiryDate": { - "type": "string", - "format": "date", - "description": "Date till when the promotion is available." + "promotion": { + "id": { + "type": "string", + "description": "Name of the promotion" + }, + "name": { + "type": "string", + "description": "Name of the promotion" + }, + "eligible": { + "type": "boolean", + "description": "Specifies whether the subscription is eligible for the promotion" + }, + "reason": { + "type": "string", + "description": "Reason in case the subscription is not eligible for promotion." + }, + "details": { + "type": "string", + "description": "Details in case the subscription is not eligible for promotion." + }, + "eligibilitySubscriptionId": { + "type": "string", + "description": "Subscription Id on which the eligibility check was performed." + }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "Date till when the promotion is available." + } } } }, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json index 43526fa5852c..88619396486a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/examples/PromotionCheckEligibility.json @@ -8,13 +8,15 @@ "200": { "body": { "properties": { - "id": "wvd_promo_30p", - "name": "WVD 30 percent off", - "eligible": true, - "reason": "None", - "details": "", - "eligibilitySubscriptionId": "f6dc64c8-34bb-43d3-96b0-fd2b8c94f1c3", - "expiryDate": "2021-10-01" + "promotion": { + "id": "wvd_promo_30p", + "name": "WVD 30 percent off", + "eligible": true, + "reason": "None", + "details": "", + "eligibilitySubscriptionId": "f6dc64c8-34bb-43d3-96b0-fd2b8c94f1c3", + "expiryDate": "2021-10-01" + } } } } From b0cfbc97b8d31212753716c9c2d36fa6b87ad56f Mon Sep 17 00:00:00 2001 From: rishi Date: Tue, 9 Nov 2021 19:42:11 -0800 Subject: [PATCH 11/24] fixing swagger --- .../2020-09-01-preview/billingPromotions.json | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index 001444299212..ce04ec821cff 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -307,6 +307,15 @@ "type": "object", "properties": { "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PromotionCheckEligibilityResponsePromptionProperties" + } + } + }, + "PromotionCheckEligibilityResponsePromptionProperties": { + "type": "object", + "properties": { + "promotion": { "x-ms-client-flatten": true, "$ref": "#/definitions/PromotionCheckEligibilityResponseProperties" } @@ -315,36 +324,34 @@ "PromotionCheckEligibilityResponseProperties": { "type": "object", "properties": { - "promotion": { - "id": { - "type": "string", - "description": "Name of the promotion" - }, - "name": { - "type": "string", - "description": "Name of the promotion" - }, - "eligible": { - "type": "boolean", - "description": "Specifies whether the subscription is eligible for the promotion" - }, - "reason": { - "type": "string", - "description": "Reason in case the subscription is not eligible for promotion." - }, - "details": { - "type": "string", - "description": "Details in case the subscription is not eligible for promotion." - }, - "eligibilitySubscriptionId": { - "type": "string", - "description": "Subscription Id on which the eligibility check was performed." - }, - "expiryDate": { - "type": "string", - "format": "date", - "description": "Date till when the promotion is available." - } + "id": { + "type": "string", + "description": "Name of the promotion" + }, + "name": { + "type": "string", + "description": "Name of the promotion" + }, + "eligible": { + "type": "boolean", + "description": "Specifies whether the subscription is eligible for the promotion" + }, + "reason": { + "type": "string", + "description": "Reason in case the subscription is not eligible for promotion." + }, + "details": { + "type": "string", + "description": "Details in case the subscription is not eligible for promotion." + }, + "eligibilitySubscriptionId": { + "type": "string", + "description": "Subscription Id on which the eligibility check was performed." + }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "Date till when the promotion is available." } } }, From a658172444ab53355840dde22b593d6ded6938e2 Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 16 Dec 2021 15:10:48 -0800 Subject: [PATCH 12/24] Adding operations API --- .../2020-09-01-preview/billingPromotions.json | 80 +++++++++++++++++++ .../2020-11-01-preview/billingPromotions.json | 80 +++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index ce04ec821cff..7cbd48950acb 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -16,6 +16,37 @@ "application/json" ], "paths": { + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available billing REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/providers/Microsoft.Billing/promotions/{promotionId}": { "put": { "summary": "Activate promotion", @@ -175,6 +206,55 @@ } }, "definitions": { + "OperationListResult": { + "description": "The list of billing operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Billing REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed such as invoice and billing subscription.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type such as read, write and delete.", + "type": "string", + "readOnly": true + } + } + } + } + }, "PromotionCreateRequest": { "type": "object", "x-ms-azure-resource": true, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json index 71d5830f954e..bf5fccec7123 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json @@ -16,6 +16,37 @@ "application/json" ], "paths": { + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available billing REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/providers/Microsoft.Billing/promotions/{promotionId}": { "put": { "summary": "Activate promotion", @@ -175,6 +206,55 @@ } }, "definitions": { + "OperationListResult": { + "description": "The list of billing operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Billing REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed such as invoice and billing subscription.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type such as read, write and delete.", + "type": "string", + "readOnly": true + } + } + } + } + }, "PromotionCreateRequest": { "type": "object", "x-ms-azure-resource": true, From b77cdb73016d84252c08c331cd7fcfa0c31fe5d2 Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 16 Dec 2021 15:47:02 -0800 Subject: [PATCH 13/24] fixing validation error --- .../preview/2020-09-01-preview/billingPromotions.json | 2 ++ .../preview/2020-11-01-preview/billingPromotions.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index 7cbd48950acb..979dafa9c4f6 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -208,6 +208,7 @@ "definitions": { "OperationListResult": { "description": "The list of billing operations and a URL link to get the next set of results.", + "type": "object", "properties": { "value": { "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", @@ -235,6 +236,7 @@ }, "display": { "description": "The object that represents the operation.", + "type": "object", "properties": { "provider": { "description": "Service provider: Microsoft.Billing.", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json index bf5fccec7123..1ea9650a2c26 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json @@ -208,6 +208,7 @@ "definitions": { "OperationListResult": { "description": "The list of billing operations and a URL link to get the next set of results.", + "type": "object", "properties": { "value": { "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", @@ -235,6 +236,7 @@ }, "display": { "description": "The object that represents the operation.", + "type": "object", "properties": { "provider": { "description": "Service provider: Microsoft.Billing.", From 6952a09307e9c0d1bd034c336b28f051591323db Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 16 Dec 2021 16:17:19 -0800 Subject: [PATCH 14/24] fixing version param --- .../preview/2020-09-01-preview/billingPromotions.json | 9 ++++++++- .../preview/2020-11-01-preview/billingPromotions.json | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index 979dafa9c4f6..6ba0e772f8c3 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -25,7 +25,7 @@ "description": "Lists the available billing REST API operations.", "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/versionParameter" } ], "responses": { @@ -497,6 +497,13 @@ } }, "parameters": { + "versionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The version of the API to be used with the client request. The current version is 2020-05-01." + }, "apiVersionParameter": { "name": "api-version", "in": "query", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json index 1ea9650a2c26..7ed56c821777 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json @@ -25,7 +25,7 @@ "description": "Lists the available billing REST API operations.", "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "#/parameters/versionParameter" } ], "responses": { @@ -484,6 +484,13 @@ } }, "parameters": { + "versionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The version of the API to be used with the client request. The current version is 2020-05-01." + }, "apiVersionParameter": { "name": "api-version", "in": "query", From f0454ffe1b5699bb2febb45ca02b950314bb01df Mon Sep 17 00:00:00 2001 From: rishi Date: Fri, 21 Jan 2022 09:34:58 -0800 Subject: [PATCH 15/24] Fixing the operations API --- .../2020-09-01-preview/billingPromotions.json | 82 ---------- .../2020-11-01-preview/billingPromotions.json | 82 ---------- .../stable/2020-05-01/billingOperations.json | 152 ++++++++++++++++++ .../billing/resource-manager/readme.md | 3 + 4 files changed, 155 insertions(+), 164 deletions(-) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index 6ba0e772f8c3..ac9b067285c0 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -16,37 +16,6 @@ "application/json" ], "paths": { - "/providers/Microsoft.Billing/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists the available billing REST API operations.", - "parameters": [ - { - "$ref": "#/parameters/versionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, "/providers/Microsoft.Billing/promotions/{promotionId}": { "put": { "summary": "Activate promotion", @@ -206,57 +175,6 @@ } }, "definitions": { - "OperationListResult": { - "description": "The list of billing operations and a URL link to get the next set of results.", - "type": "object", - "properties": { - "value": { - "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - } - }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true - } - } - }, - "Operation": { - "description": "A Billing REST API operation.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true - }, - "display": { - "description": "The object that represents the operation.", - "type": "object", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Billing.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed such as invoice and billing subscription.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type such as read, write and delete.", - "type": "string", - "readOnly": true - } - } - } - } - }, "PromotionCreateRequest": { "type": "object", "x-ms-azure-resource": true, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json index 7ed56c821777..1dec5c000556 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json @@ -16,37 +16,6 @@ "application/json" ], "paths": { - "/providers/Microsoft.Billing/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists the available billing REST API operations.", - "parameters": [ - { - "$ref": "#/parameters/versionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, "/providers/Microsoft.Billing/promotions/{promotionId}": { "put": { "summary": "Activate promotion", @@ -206,57 +175,6 @@ } }, "definitions": { - "OperationListResult": { - "description": "The list of billing operations and a URL link to get the next set of results.", - "type": "object", - "properties": { - "value": { - "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - } - }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true - } - } - }, - "Operation": { - "description": "A Billing REST API operation.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true - }, - "display": { - "description": "The object that represents the operation.", - "type": "object", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Billing.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed such as invoice and billing subscription.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type such as read, write and delete.", - "type": "string", - "readOnly": true - } - } - } - } - }, "PromotionCreateRequest": { "type": "object", "x-ms-azure-resource": true, diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json new file mode 100644 index 000000000000..7a1e8facd994 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json @@ -0,0 +1,152 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-05-01", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available billing REST API operations.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "OperationListResult": { + "description": "The list of billing operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Billing REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Identifies if the operation is a data operation.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed such as invoice and billing subscription.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type such as read, write and delete.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description of operation.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The version of the API to be used with the client request. The current version is 2020-05-01." + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 52fad95257fb..b1cf742d6d2d 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -54,6 +54,7 @@ These settings apply only when `--tag=package-2020-05` is specified on the comma ``` yaml $(tag) == 'package-2020-05' input-file: +- Microsoft.Billing/stable/2020-05-01/billingOperations.json - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2018-03-01-preview/billingV2.json ``` @@ -64,6 +65,7 @@ These settings apply only when `--tag=package-2020-09-preview` is specified on t ``` yaml $(tag) == 'package-2020-09-preview' input-file: +- Microsoft.Billing/stable/2020-05-01/billingOperations.json - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json ``` @@ -74,6 +76,7 @@ These settings apply only when `--tag=package-2020-11-preview` is specified on t ``` yaml $(tag) == 'package-2020-11-preview' input-file: +- Microsoft.Billing/stable/2020-05-01/billingOperations.json - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json ``` From ed8a2d87321e8909716923398d280b915fbe9b22 Mon Sep 17 00:00:00 2001 From: rishi Date: Fri, 21 Jan 2022 09:59:24 -0800 Subject: [PATCH 16/24] fixing missing reference --- .../stable/2020-05-01/billingOperations.json | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json index 7a1e8facd994..55863578e7e8 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json @@ -120,6 +120,26 @@ "$ref": "#/definitions/ErrorDetails" } } + }, + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } } }, "parameters": { From ad43ceb87be469a056795824fcd782c01e69080c Mon Sep 17 00:00:00 2001 From: rishi Date: Fri, 21 Jan 2022 10:19:31 -0800 Subject: [PATCH 17/24] fixing swagger model --- .../stable/2020-05-01/billingOperations.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json index 55863578e7e8..18247c45f092 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json @@ -41,7 +41,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "#/definitions/OperationsErrorResponse" } } }, @@ -111,17 +111,17 @@ } } }, - "ErrorResponse": { + "OperationsErrorResponse": { "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", "type": "object", "properties": { "error": { "description": "The details of the error.", - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/OperationsErrorDetails" } } }, - "ErrorDetails": { + "OperationsErrorDetails": { "description": "The details of the error.", "properties": { "code": { From 47ab82b551209ee4b4985f902742742403690d0e Mon Sep 17 00:00:00 2001 From: rishi Date: Fri, 21 Jan 2022 10:46:50 -0800 Subject: [PATCH 18/24] fixing object type --- .../Microsoft.Billing/stable/2020-05-01/billingOperations.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json index 18247c45f092..cf23040fde77 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json @@ -123,6 +123,7 @@ }, "OperationsErrorDetails": { "description": "The details of the error.", + "type": "object", "properties": { "code": { "description": "Error code.", From 30968b07ddbde20b488c6e105febd75d5656c27d Mon Sep 17 00:00:00 2001 From: rishi Date: Fri, 21 Jan 2022 10:56:43 -0800 Subject: [PATCH 19/24] fixing more swagge validations --- .../preview/2020-09-01-preview/billingPromotions.json | 1 + .../preview/2020-11-01-preview/billingPromotions.json | 2 ++ .../Microsoft.Billing/stable/2020-05-01/billingOperations.json | 2 ++ 3 files changed, 5 insertions(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json index ac9b067285c0..c576917da1d3 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json @@ -367,6 +367,7 @@ }, "ErrorDetails": { "description": "The details of the error.", + "type": "object", "properties": { "code": { "description": "Error code.", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json index 1dec5c000556..c0fd4dbb91b3 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json @@ -217,6 +217,7 @@ }, "PromotionList": { "description": "The list of promotions.", + "type": "object", "properties": { "value": { "description": "The list of promotions.", @@ -354,6 +355,7 @@ }, "ErrorDetails": { "description": "The details of the error.", + "type": "object", "properties": { "code": { "description": "Error code.", diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json index cf23040fde77..de47ae2c4f0e 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json @@ -54,6 +54,7 @@ "definitions": { "OperationListResult": { "description": "The list of billing operations and a URL link to get the next set of results.", + "type": "object", "properties": { "value": { "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", @@ -86,6 +87,7 @@ }, "display": { "description": "The object that represents the operation.", + "type": "object", "properties": { "provider": { "description": "Service provider: Microsoft.Billing.", From 433318fd3a5e9a31429c68323007736861e2990c Mon Sep 17 00:00:00 2001 From: rishi Date: Mon, 24 Jan 2022 09:47:26 -0800 Subject: [PATCH 20/24] removing operations --- .../stable/2020-05-01/billing.json | 34 ------------------- 1 file changed, 34 deletions(-) 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 28f549ec77bc..d095daab6817 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 @@ -2635,40 +2635,6 @@ } } }, - "/providers/Microsoft.Billing/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists the available billing REST API operations.", - "externalDocs": { - "url": "https://docs.microsoft.com/en-us/rest/api/billing/" - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingPermissions": { "get": { "tags": [ From fb806407d7d27888ce226a72ddb9385e250c5c94 Mon Sep 17 00:00:00 2001 From: rishi Date: Thu, 27 Jan 2022 21:06:05 -0800 Subject: [PATCH 21/24] removing operations --- .../stable/2020-05-01/billing.json | 59 ------------------- 1 file changed, 59 deletions(-) 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 d095daab6817..555f0fad7219 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 @@ -6086,65 +6086,6 @@ } } }, - "Operation": { - "description": "A Billing REST API operation.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true - }, - "isDataAction": { - "description": "Identifies if the operation is a data operation.", - "type": "boolean", - "readOnly": true - }, - "display": { - "description": "The object that represents the operation.", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Billing.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "Resource on which the operation is performed such as invoice and billing subscription.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "Operation type such as read, write and delete.", - "type": "string", - "readOnly": true - }, - "description": { - "description": "Description of operation.", - "type": "string", - "readOnly": true - } - } - } - } - }, - "OperationListResult": { - "description": "The list of billing operations and a URL link to get the next set of results.", - "properties": { - "value": { - "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - } - }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "readOnly": true - } - } - }, "BillingRoleAssignmentListResult": { "description": "The list of role assignments.", "properties": { From 8026ff11598be67b43f04871fc232080f6f9e7c0 Mon Sep 17 00:00:00 2001 From: rishi Date: Fri, 28 Jan 2022 09:10:44 -0800 Subject: [PATCH 22/24] fixing model --- .../billingOperations.json | 8 +- .../2020-09-01-preview/billingOperations.json | 175 ++++++++++++++++++ .../2020-11-01-preview/billingOperations.json | 175 ++++++++++++++++++ .../billing/resource-manager/readme.md | 6 +- 4 files changed, 357 insertions(+), 7 deletions(-) rename specification/billing/resource-manager/Microsoft.Billing/{stable/2020-05-01 => preview/2018-03-01-preview}/billingOperations.json (96%) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingOperations.json similarity index 96% rename from specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingOperations.json index de47ae2c4f0e..b98cca49aad5 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingOperations.json @@ -41,7 +41,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/OperationsErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } }, @@ -113,17 +113,17 @@ } } }, - "OperationsErrorResponse": { + "ErrorResponse": { "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", "type": "object", "properties": { "error": { "description": "The details of the error.", - "$ref": "#/definitions/OperationsErrorDetails" + "$ref": "#/definitions/ErrorDetails" } } }, - "OperationsErrorDetails": { + "ErrorDetails": { "description": "The details of the error.", "type": "object", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json new file mode 100644 index 000000000000..b98cca49aad5 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json @@ -0,0 +1,175 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-05-01", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available billing REST API operations.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "OperationListResult": { + "description": "The list of billing operations and a URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Billing REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Identifies if the operation is a data operation.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "type": "object", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed such as invoice and billing subscription.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type such as read, write and delete.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description of operation.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The version of the API to be used with the client request. The current version is 2020-05-01." + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json new file mode 100644 index 000000000000..b98cca49aad5 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json @@ -0,0 +1,175 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-05-01", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available billing REST API operations.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "OperationListResult": { + "description": "The list of billing operations and a URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "description": "The list of billing operations supported by the Microsoft.Billing resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Billing REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Identifies if the operation is a data operation.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "type": "object", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed such as invoice and billing subscription.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type such as read, write and delete.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description of operation.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The version of the API to be used with the client request. The current version is 2020-05-01." + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index b1cf742d6d2d..c409198aaeab 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -54,9 +54,9 @@ These settings apply only when `--tag=package-2020-05` is specified on the comma ``` yaml $(tag) == 'package-2020-05' input-file: -- Microsoft.Billing/stable/2020-05-01/billingOperations.json - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2018-03-01-preview/billingV2.json +- Microsoft.Billing/stable/2018-03-01-preview/billingOperations.json ``` ### Tag: package-2020-09-preview @@ -65,9 +65,9 @@ These settings apply only when `--tag=package-2020-09-preview` is specified on t ``` yaml $(tag) == 'package-2020-09-preview' input-file: -- Microsoft.Billing/stable/2020-05-01/billingOperations.json - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json +- Microsoft.Billing/stable/2020-09-01-preview/billingOperations.json ``` ### Tag: package-2020-11-preview @@ -76,9 +76,9 @@ These settings apply only when `--tag=package-2020-11-preview` is specified on t ``` yaml $(tag) == 'package-2020-11-preview' input-file: -- Microsoft.Billing/stable/2020-05-01/billingOperations.json - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json +- Microsoft.Billing/stable/2020-11-01-preview/billingOperations.json ``` ### Tag: package-2019-10-preview From dd65f0d803fb6ec44338e5cbe2137fd5882c0915 Mon Sep 17 00:00:00 2001 From: rishi Date: Fri, 28 Jan 2022 09:19:43 -0800 Subject: [PATCH 23/24] fixing path --- specification/billing/resource-manager/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index c409198aaeab..61c24a554055 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -56,7 +56,7 @@ These settings apply only when `--tag=package-2020-05` is specified on the comma input-file: - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2018-03-01-preview/billingV2.json -- Microsoft.Billing/stable/2018-03-01-preview/billingOperations.json +- Microsoft.Billing/preview/2018-03-01-preview/billingOperations.json ``` ### Tag: package-2020-09-preview @@ -67,7 +67,7 @@ These settings apply only when `--tag=package-2020-09-preview` is specified on t input-file: - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2020-09-01-preview/billingPromotions.json -- Microsoft.Billing/stable/2020-09-01-preview/billingOperations.json +- Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json ``` ### Tag: package-2020-11-preview @@ -78,7 +78,7 @@ These settings apply only when `--tag=package-2020-11-preview` is specified on t input-file: - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2020-11-01-preview/billingPromotions.json -- Microsoft.Billing/stable/2020-11-01-preview/billingOperations.json +- Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json ``` ### Tag: package-2019-10-preview From bc3817ebda1befe36385d1fd496c9de527b9a6a2 Mon Sep 17 00:00:00 2001 From: rishi Date: Sun, 30 Jan 2022 16:48:19 -0800 Subject: [PATCH 24/24] fxing swagger --- .../preview/2020-09-01-preview/billingOperations.json | 10 +++++----- .../preview/2020-11-01-preview/billingOperations.json | 10 +++++----- .../2020-05-01}/billingOperations.json | 8 ++++---- specification/billing/resource-manager/readme.md | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) rename specification/billing/resource-manager/Microsoft.Billing/{preview/2018-03-01-preview => stable/2020-05-01}/billingOperations.json (96%) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json index b98cca49aad5..c4e7f60b9ed1 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-09-01-preview/billingOperations.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2020-05-01", + "version": "2020-09-01-preview", "title": "BillingManagementClient", "description": "Billing client provides access to billing resources for Azure subscriptions." }, @@ -41,7 +41,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "#/definitions/OperationsErrorResponse" } } }, @@ -113,17 +113,17 @@ } } }, - "ErrorResponse": { + "OperationsErrorResponse": { "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", "type": "object", "properties": { "error": { "description": "The details of the error.", - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/OperationsErrorDetails" } } }, - "ErrorDetails": { + "OperationsErrorDetails": { "description": "The details of the error.", "type": "object", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json index b98cca49aad5..3126645acb0f 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/billingOperations.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2020-05-01", + "version": "2020-11-01-preview", "title": "BillingManagementClient", "description": "Billing client provides access to billing resources for Azure subscriptions." }, @@ -41,7 +41,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "#/definitions/OperationsErrorResponse" } } }, @@ -113,17 +113,17 @@ } } }, - "ErrorResponse": { + "OperationsErrorResponse": { "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", "type": "object", "properties": { "error": { "description": "The details of the error.", - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/OperationsErrorDetails" } } }, - "ErrorDetails": { + "OperationsErrorDetails": { "description": "The details of the error.", "type": "object", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingOperations.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json similarity index 96% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingOperations.json rename to specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json index b98cca49aad5..de47ae2c4f0e 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingOperations.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billingOperations.json @@ -41,7 +41,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "#/definitions/OperationsErrorResponse" } } }, @@ -113,17 +113,17 @@ } } }, - "ErrorResponse": { + "OperationsErrorResponse": { "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", "type": "object", "properties": { "error": { "description": "The details of the error.", - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/OperationsErrorDetails" } } }, - "ErrorDetails": { + "OperationsErrorDetails": { "description": "The details of the error.", "type": "object", "properties": { diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 61c24a554055..fef550323a96 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -56,7 +56,7 @@ These settings apply only when `--tag=package-2020-05` is specified on the comma input-file: - Microsoft.Billing/stable/2020-05-01/billing.json - Microsoft.Billing/preview/2018-03-01-preview/billingV2.json -- Microsoft.Billing/preview/2018-03-01-preview/billingOperations.json +- Microsoft.Billing/stable/2020-05-01/billingOperations.json ``` ### Tag: package-2020-09-preview