From a97469c48a9c485e230bc93b82e6b2dfeaf9a723 Mon Sep 17 00:00:00 2001 From: Bidisha Chakraborty <29803402+bidisha-c@users.noreply.github.com> Date: Wed, 11 May 2022 09:11:13 -0700 Subject: [PATCH 1/3] Add cancel endpoint for conversations --- .../analyzeconversations.json | 40 +++++++++++++++++++ ...AnalyzeConversationsJobsCancelRequest.json | 15 +++++++ 2 files changed, 55 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json index 8cfb3f1ea59c..ddcddf81dbf3 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json @@ -179,6 +179,46 @@ } } } + }, + "/analyze-conversations/jobs/{jobId}:cancel": { + "post": { + "produces": [ + "application/json" + ], + "description": "Cancel a long-running Text Analysis conversations job.", + "operationId": "AnalyzeConversation_CancelJob", + "summary": "Cancel a long-running Text Analysis conversations job", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "common.json#/parameters/JobId" + } + ], + "responses": { + "202": { + "description": "Cancel Job request has been received.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Job Delete Request": { + "$ref": ".//examples//conversations//SuccessfulAnalyzeConversationsJobsCancelRequest.json" + } + }, + "x-ms-long-running-operation": true + } } }, "definitions": { diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json new file mode 100644 index 000000000000..69d9d9b2f4e9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversations/jobs/{jobId}?api-version=2022-05-01-preview" + } + } + } +} From 6a140192baf9aa797a9dbde4095c2645701da5cd Mon Sep 17 00:00:00 2001 From: Bidisha Chakraborty <29803402+bidisha-c@users.noreply.github.com> Date: Wed, 11 May 2022 09:14:12 -0700 Subject: [PATCH 2/3] Update examples path --- .../examples/SuccessfulAnalyzeTextJobsCancelRequest.json | 2 +- .../SuccessfulAnalyzeConversationsJobsCancelRequest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/SuccessfulAnalyzeTextJobsCancelRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/SuccessfulAnalyzeTextJobsCancelRequest.json index 11357ea9ab3a..28a4b3eef607 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/SuccessfulAnalyzeTextJobsCancelRequest.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/SuccessfulAnalyzeTextJobsCancelRequest.json @@ -8,7 +8,7 @@ "responses": { "202": { "headers": { - "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2022-05-01-preview" + "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2022-05-15-preview" } } } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json index 69d9d9b2f4e9..c5263bc5e960 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json @@ -8,7 +8,7 @@ "responses": { "202": { "headers": { - "Operation-Location": "{Endpoint}/language/analyze-conversations/jobs/{jobId}?api-version=2022-05-01-preview" + "Operation-Location": "{Endpoint}/language/analyze-conversations/jobs/{jobId}?api-version=2022-05-15-preview" } } } From d24da2f85986439eb4aea857af8ce48411cc1367 Mon Sep 17 00:00:00 2001 From: Bidisha Chakraborty <29803402+bidisha-c@users.noreply.github.com> Date: Thu, 12 May 2022 14:59:42 -0700 Subject: [PATCH 3/3] Make the input for transcriptConversationItem optional --- .../preview/2022-05-15-preview/analyzeconversations.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json index ddcddf81dbf3..31331a83a80e 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json @@ -1758,12 +1758,6 @@ "TranscriptConversationItem": { "type": "object", "description": "Additional properties for supporting transcript conversation.", - "required": [ - "text", - "lexical", - "itn", - "maskedItn" - ], "allOf": [ { "$ref": "#/definitions/ConversationItemBase"