From 2de44e99c2c1de3a615bb3e1c8c09a2f6750817f Mon Sep 17 00:00:00 2001 From: Yang Yuan Date: Tue, 27 Oct 2020 12:17:49 -0700 Subject: [PATCH 1/4] Swagger Correctness --- .../2016-02-01-preview/cognitiveservices.json | 21 ++++++++++++++++++- .../stable/2017-04-18/cognitiveservices.json | 8 ++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2016-02-01-preview/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2016-02-01-preview/cognitiveservices.json index a86e5010705b..df27eb6924aa 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2016-02-01-preview/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2016-02-01-preview/cognitiveservices.json @@ -72,6 +72,12 @@ "$ref": "#/definitions/CognitiveServicesAccount" } }, + "202": { + "description": "HTTP 202 (Accepted) if the operation was successfully started and will complete asynchronously.", + "schema": { + "$ref": "#/definitions/CognitiveServicesAccount" + } + }, "default": { "description": "Error response describing why the operation failed", "schema": { @@ -128,6 +134,12 @@ "$ref": "#/definitions/CognitiveServicesAccount" } }, + "202": { + "description": "HTTP 202 (Accepted) if the operation was successfully started and will complete asynchronously.", + "schema": { + "$ref": "#/definitions/CognitiveServicesAccount" + } + }, "default": { "description": "Error response describing why the operation failed. If the resource group *or* resource does not exist, 404 (NotFound) should be returned.", "schema": { @@ -580,7 +592,8 @@ "enum": [ "Free", "Standard", - "Premium" + "Premium", + "Enterprise" ], "x-ms-enum": { "name": "SkuTier", @@ -662,6 +675,7 @@ "description": "Gets the status of the cognitive services account at the time the operation was called.", "enum": [ "Creating", + "Accepted", "ResolvingDNS", "Succeeded", "Failed" @@ -674,6 +688,11 @@ "endpoint": { "type": "string", "description": "Endpoint of the created account" + }, + "internalId": { + "type": "string", + "description": "The internal identifier.", + "readOnly": true } } }, diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json index 4413c8ecc9ef..d225e3b3c9c1 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json @@ -860,7 +860,8 @@ "enum": [ "Free", "Standard", - "Premium" + "Premium", + "Enterprise" ], "x-ms-enum": { "name": "SkuTier", @@ -985,6 +986,11 @@ }, "description": "Gets the capabilities of the cognitive services account. Each item indicates the capability of a specific feature. The values are read-only and for reference only." }, + "dateCreated": { + "readOnly": true, + "type": "string", + "description": "Gets the date of cognitive services account creation." + }, "customSubDomainName": { "type": "string", "description": "Optional subdomain name used for token-based authentication." From ac83b067af2ef46d565edf7bee00b202952d6d46 Mon Sep 17 00:00:00 2001 From: Yang Yuan Date: Tue, 27 Oct 2020 12:31:04 -0700 Subject: [PATCH 2/4] Undo changes in 2016-02-01-preview --- .../2016-02-01-preview/cognitiveservices.json | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2016-02-01-preview/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2016-02-01-preview/cognitiveservices.json index df27eb6924aa..a86e5010705b 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2016-02-01-preview/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2016-02-01-preview/cognitiveservices.json @@ -72,12 +72,6 @@ "$ref": "#/definitions/CognitiveServicesAccount" } }, - "202": { - "description": "HTTP 202 (Accepted) if the operation was successfully started and will complete asynchronously.", - "schema": { - "$ref": "#/definitions/CognitiveServicesAccount" - } - }, "default": { "description": "Error response describing why the operation failed", "schema": { @@ -134,12 +128,6 @@ "$ref": "#/definitions/CognitiveServicesAccount" } }, - "202": { - "description": "HTTP 202 (Accepted) if the operation was successfully started and will complete asynchronously.", - "schema": { - "$ref": "#/definitions/CognitiveServicesAccount" - } - }, "default": { "description": "Error response describing why the operation failed. If the resource group *or* resource does not exist, 404 (NotFound) should be returned.", "schema": { @@ -592,8 +580,7 @@ "enum": [ "Free", "Standard", - "Premium", - "Enterprise" + "Premium" ], "x-ms-enum": { "name": "SkuTier", @@ -675,7 +662,6 @@ "description": "Gets the status of the cognitive services account at the time the operation was called.", "enum": [ "Creating", - "Accepted", "ResolvingDNS", "Succeeded", "Failed" @@ -688,11 +674,6 @@ "endpoint": { "type": "string", "description": "Endpoint of the created account" - }, - "internalId": { - "type": "string", - "description": "The internal identifier.", - "readOnly": true } } }, From 9e6759a059892b477bdb71ed981953aa0307be74 Mon Sep 17 00:00:00 2001 From: Yang Yuan Date: Thu, 5 Nov 2020 11:25:54 -0800 Subject: [PATCH 3/4] Move location of field --- .../stable/2017-04-18/cognitiveservices.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json index d225e3b3c9c1..c207fc037e7b 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json @@ -986,11 +986,6 @@ }, "description": "Gets the capabilities of the cognitive services account. Each item indicates the capability of a specific feature. The values are read-only and for reference only." }, - "dateCreated": { - "readOnly": true, - "type": "string", - "description": "Gets the date of cognitive services account creation." - }, "customSubDomainName": { "type": "string", "description": "Optional subdomain name used for token-based authentication." @@ -1032,6 +1027,11 @@ "apiProperties": { "$ref": "#/definitions/CognitiveServicesAccountApiProperties", "description": "The api properties for special APIs." + }, + "dateCreated": { + "readOnly": true, + "type": "string", + "description": "Gets the date of cognitive services account creation." } }, "description": "Properties of Cognitive Services account." From fca8a1eef66ebe448f1d336207cd61948ba8623b Mon Sep 17 00:00:00 2001 From: Yang Yuan Date: Wed, 18 Nov 2020 12:49:52 -0800 Subject: [PATCH 4/4] change enum type to string for Sku.tier --- .../stable/2017-04-18/cognitiveservices.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json index c207fc037e7b..e804c1bd832f 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json @@ -865,7 +865,7 @@ ], "x-ms-enum": { "name": "SkuTier", - "modelAsString": false + "modelAsString": true } } },