From 0e282182ad0d4ecba03ed1d87440b6fe87ecdd6f Mon Sep 17 00:00:00 2001 From: Han Li Date: Tue, 14 Jul 2020 23:42:52 +0000 Subject: [PATCH 1/3] fix the error in api v3.1-preview.1 --- .../preview/v3.1-preview.1/TextAnalytics.json | 11 ++--- .../examples/SuccessfulLanguagesRequest.json | 40 ++++++++----------- 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/TextAnalytics.json index 0ff15eff3ba9..be6c1a405786 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/TextAnalytics.json @@ -1279,7 +1279,7 @@ "type": "object", "required": [ "id", - "detectedLanguages", + "detectedLanguage", "warnings" ], "properties": { @@ -1287,12 +1287,9 @@ "type": "string", "description": "Unique, non-empty document identifier." }, - "detectedLanguages": { - "type": "array", - "description": "A list of extracted languages.", - "items": { - "$ref": "#/definitions/DetectedLanguage" - } + "detectedLanguage": { + "description": "Detected Language.", + "$ref": "#/definitions/DetectedLanguage" }, "warnings": { "type": "array", diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json index fad894b10669..883376e386c6 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json @@ -27,41 +27,35 @@ "documents": [ { "id": "1", - "detectedLanguages": [ - { - "name": "English", - "iso6391Name": "en", - "confidenceScore": 1 - } - ], + "detectedLanguage": { + "name": "English", + "iso6391Name": "en", + "confidenceScore": 1 + }, "warnings": [] }, { "id": "2", - "detectedLanguages": [ - { - "name": "French", - "iso6391Name": "fr", - "confidenceScore": 1 - } - ], + "detectedLanguage": { + "name": "French", + "iso6391Name": "fr", + "confidenceScore": 1 + }, "warnings": [] }, { "id": "3", - "detectedLanguages": [ - { - "name": "Spanish", - "iso6391Name": "es", - "confidenceScore": 1 - } - ], + "detectedLanguage": { + "name": "Spanish", + "iso6391Name": "es", + "confidenceScore": 1 + }, "warnings": [] } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2020-04-01" } } } -} +} \ No newline at end of file From 9f66ed6abf71ed2b58ecd648956f1891570f741b Mon Sep 17 00:00:00 2001 From: Han Li Date: Tue, 14 Jul 2020 23:44:58 +0000 Subject: [PATCH 2/3] update version --- .../v3.1-preview.1/examples/SuccessfulLanguagesRequest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json index 883376e386c6..954ce65e2e25 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json @@ -54,7 +54,7 @@ } ], "errors": [], - "modelVersion": "2020-04-01" + "modelVersion": "2019-10-01" } } } From 1adebe22e3c54fad05bee53173861c1d75a2f5c2 Mon Sep 17 00:00:00 2001 From: Han Li Date: Fri, 24 Jul 2020 00:04:27 +0000 Subject: [PATCH 3/3] fix newline --- .../v3.1-preview.1/examples/SuccessfulLanguagesRequest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json index 954ce65e2e25..a74d7155c8e0 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulLanguagesRequest.json @@ -58,4 +58,4 @@ } } } -} \ No newline at end of file +}