From 13c706558ceb3e52f026aad85725ae13a928c33b Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 24 May 2021 13:55:04 -0700 Subject: [PATCH 01/26] initial commit - WIP --- .../stable/v3.1/TextAnalytics.json | 3077 +++++++++++++++++ .../examples/SuccessfulAnalyzeRequest.json | 62 + .../SuccessfulAnalyzeStatusRequest.json | 112 + .../examples/SuccessfulEntitiesRequest.json | 94 + .../SuccessfulEntityLinkingRequest.json | 140 + .../examples/SuccessfulEntityPIIRequest.json | 100 + .../SuccessfulHealthDeleteRequest.json | 36 + .../examples/SuccessfulHealthRequest.json | 45 + .../SuccessfulHealthStatusRequest.json | 227 ++ .../examples/SuccessfulKeyPhrasesRequest.json | 83 + .../examples/SuccessfulLanguagesRequest.json | 82 + .../examples/SuccessfulSentimentRequest.json | 160 + 12 files changed, 4218 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json new file mode 100644 index 000000000000..3906353f6393 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -0,0 +1,3077 @@ +{ + "swagger": "2.0", + "info": { + "version": "v3.1", + "contact": { + "name": "Microsoft Cognitive Services", + "url": "https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/", + "email": "mlapi@microsoft.com" + }, + "title": "Text Analytics Client", + "description": "The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview" + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apim_key": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/text/analytics/{ApiVersion}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + }, + { + "$ref": "#/parameters/ApiVersion" + } + ] + }, + "paths": { + "/analyze": { + "post": { + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "description": "Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed.", + "operationId": "Analyze", + "summary": "Submit analysis job", + "parameters": [ + { + "description": "Collection of documents to analyze and tasks to execute.", + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/AnalyzeBatchInput" + } + } + ], + "responses": { + "202": { + "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Submit analysis job request": { + "$ref": ".//examples//SuccessfulAnalyzeRequest.json" + } + }, + "deprecated": false, + "x-ms-long-running-operation": true + } + }, + "/analyze/jobs/{jobId}": { + "get": { + "produces": [ + "application/json", + "text/json" + ], + "description": "Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are completed, the job will transition to the completed state and results will be available for each task.", + "operationId": "AnalyzeStatus", + "summary": "Get analysis status and results", + "parameters": [ + { + "$ref": "#/parameters/AnalyzeJobId" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "default": 20, + "description": "(Optional) Set the maximum number of results per task. When both $top and $skip are specified, $skip is applied first.", + "in": "query", + "maximum": 50, + "minimum": 1, + "name": "$top", + "type": "integer" + }, + { + "default": 0, + "description": "(Optional) Set the number of elements to offset in the response. When both $top and $skip are specified, $skip is applied first.", + "in": "query", + "minimum": 0, + "name": "$skip", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "Analysis job status and metadata.", + "schema": { + "$ref": "#/definitions/AnalyzeJobState" + } + }, + "404": { + "description": "Job ID not found.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Get Analysis job status request": { + "$ref": ".//examples//SuccessfulAnalyzeStatusRequest.json" + } + }, + "deprecated": false + } + }, + "/entities/health/jobs/{jobId}": { + "get": { + "produces": [ + "application/json", + "text/json" + ], + "description": "Get details of the healthcare prediction job specified by the jobId.", + "operationId": "HealthStatus", + "summary": "Get healthcare analysis job status and results", + "parameters": [ + { + "$ref": "#/parameters/JobId" + }, + { + "default": 20, + "description": "(Optional) Set the maximum number of results per task. When both $top and $skip are specified, $skip is applied first.", + "in": "query", + "maximum": 50, + "minimum": 1, + "name": "$top", + "type": "integer" + }, + { + "default": 0, + "description": "(Optional) Set the number of elements to offset in the response. When both $top and $skip are specified, $skip is applied first.", + "in": "query", + "minimum": 0, + "name": "$skip", + "type": "integer" + }, + { + "$ref": "#/parameters/ShowStats" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/HealthcareJobState" + } + }, + "404": { + "description": "Job ID not found.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Health request": { + "$ref": ".//examples//SuccessfulHealthStatusRequest.json" + } + }, + "deprecated": false + }, + "delete": { + "produces": [ + "application/json", + "text/json" + ], + "description": "Cancel healthcare prediction job.", + "operationId": "CancelHealthJob", + "summary": "Cancel healthcare prediction job", + "parameters": [ + { + "$ref": "#/parameters/JobId" + } + ], + "responses": { + "202": { + "description": "Cancel Job request has been received.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "404": { + "description": "Job ID not found.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Health request": { + "$ref": ".//examples//SuccessfulHealthDeleteRequest.json" + } + }, + "deprecated": false, + "x-ms-long-running-operation": true + } + }, + "/entities/health/jobs": { + "post": { + "summary": "Submit healthcare analysis job", + "description": "Start a healthcare analysis job to recognize healthcare related entities (drugs, conditions, symptoms, etc) and their relations.", + "operationId": "Health", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + }, + { + "$ref": "#/parameters/LoggingOptOut" + } + ], + "responses": { + "202": { + "description": "Accepted - call results in a link where the status of the submitted job can be checked via the GET operation.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Health request": { + "$ref": ".//examples//SuccessfulHealthRequest.json" + } + }, + "deprecated": false, + "x-ms-long-running-operation": true + } + }, + "/entities/recognition/general": { + "post": { + "summary": "Named Entity Recognition", + "description": "The API returns a list of general named entities in a given document. For the list of supported entity types, check Supported Entity Types in Text Analytics API. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "EntitiesRecognitionGeneral", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in a list of recognized entities returned for each valid document.", + "schema": { + "$ref": "#/definitions/EntitiesResult" + } + }, + "400": { + "description": "Bad Request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Entities request": { + "$ref": ".//examples//SuccessfulEntitiesRequest.json" + } + }, + "deprecated": false + } + }, + "/entities/recognition/pii": { + "post": { + "summary": "Entities containing personal information", + "description": "The API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. For the list of supported entity types, check Supported Entity Types in Text Analytics API. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "operationId": "EntitiesRecognitionPii", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "name": "domain", + "in": "query", + "description": "(Optional) if specified, will set the PII domain to include only a subset of the entity categories. Possible values include: 'PHI', 'none'.", + "type": "string" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/PiiCategories" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in a list of entities containing personal information returned for each valid document", + "schema": { + "$ref": "#/definitions/PiiResult" + } + }, + "400": { + "description": "Bad Request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Entity PII request": { + "$ref": ".//examples//SuccessfulEntityPIIRequest.json" + } + }, + "deprecated": false + } + }, + "/entities/linking": { + "post": { + "summary": "Linked entities from a well known knowledge base", + "description": "The API returns a list of recognized entities with links to a well known knowledge base. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "EntitiesLinking", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in a list of recognized entities with links to a well known knowledge base returned for each valid document", + "schema": { + "$ref": "#/definitions/EntityLinkingResult" + } + }, + "400": { + "description": "Bad Request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Entity Linking request": { + "$ref": ".//examples//SuccessfulEntityLinkingRequest.json" + } + }, + "deprecated": false + } + }, + "/keyPhrases": { + "post": { + "summary": "Key Phrases", + "description": "The API returns a list of strings denoting the key phrases in the input text. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "KeyPhrases", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful response results in 0 or more key phrases identified in each valid document", + "schema": { + "$ref": "#/definitions/KeyPhraseResult" + } + }, + "400": { + "description": "Bad Request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Key Phrase request": { + "$ref": ".//examples//SuccessfulKeyPhrasesRequest.json" + } + }, + "deprecated": false + } + }, + "/languages": { + "post": { + "summary": "Detect Language", + "description": "The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "Languages", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "$ref": "#/parameters/LanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in the detected language with the highest probability for each valid document", + "schema": { + "$ref": "#/definitions/LanguageResult" + } + }, + "400": { + "description": "Bad Request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Detect Language request": { + "$ref": ".//examples//SuccessfulLanguagesRequest.json" + } + }, + "deprecated": false + } + }, + "/sentiment": { + "post": { + "summary": "Sentiment", + "description": "The API returns a detailed sentiment analysis for the input text. The analysis is done in multiple levels of granularity, start from the a document level, down to sentence and key terms (targets and assessments).", + "operationId": "Sentiment", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "name": "opinionMining", + "in": "query", + "description": "(Optional) if set to true, response will contain not only sentiment prediction but also opinion mining (aspect-based sentiment analysis) results.", + "type": "boolean" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in a document sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral)", + "schema": { + "$ref": "#/definitions/SentimentResponse" + } + }, + "400": { + "description": "Bad Request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "Internal error response", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Successful Sentiment request": { + "$ref": ".//examples//SuccessfulSentimentRequest.json" + } + }, + "deprecated": false + } + } + }, + "definitions": { + "JobManifest": { + "properties": { + "tasks": { + "description": "The set of tasks to execute on the input documents. Cannot specify the same task more than once.", + "properties": { + "entityRecognitionTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/EntitiesTask" + } + }, + "entityRecognitionPiiTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/PiiTask" + } + }, + "keyPhraseExtractionTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/KeyPhrasesTask" + } + }, + "entityLinkingTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityLinkingTask" + } + }, + "sentimentAnalysisTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/SentimentAnalysisTask" + } + } + }, + "type": "object" + } + }, + "required": [ + "tasks" + ], + "type": "object" + }, + "MultiLanguageBatchInput": { + "type": "object", + "required": [ + "documents" + ], + "properties": { + "documents": { + "type": "array", + "description": "The set of documents to process as part of this batch.", + "items": { + "$ref": "#/definitions/MultiLanguageInput" + } + } + }, + "description": "Contains a set of input documents to be analyzed by the service." + }, + "MultiLanguageInput": { + "type": "object", + "required": [ + "id", + "text" + ], + "properties": { + "id": { + "type": "string", + "description": "A unique, non-empty document identifier." + }, + "text": { + "type": "string", + "description": "The input text to process." + }, + "language": { + "type": "string", + "description": "(Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default." + } + }, + "description": "Contains an input document to be analyzed by the service." + }, + "DocumentError": { + "type": "object", + "required": [ + "id", + "error" + ], + "properties": { + "id": { + "type": "string", + "description": "Document Id." + }, + "error": { + "type": "object", + "description": "Document Error.", + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "description": "Document Error.", + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "TextAnalyticsError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "InvalidRequest", + "InvalidArgument", + "InternalServerError", + "ServiceUnavailable", + "NotFound" + ], + "x-ms-enum": { + "name": "ErrorCodeValue", + "modelAsString": false + }, + "description": "Error code." + }, + "message": { + "type": "string", + "description": "Error message." + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerError", + "description": "Inner error contains more specific information." + }, + "details": { + "type": "array", + "description": "Details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/TextAnalyticsError" + } + } + } + }, + "TextAnalyticsWarning": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "LongWordsInDocument", + "DocumentTruncated" + ], + "x-ms-enum": { + "name": "WarningCodeValue", + "modelAsString": true + }, + "description": "Error code." + }, + "message": { + "type": "string", + "description": "Warning message." + }, + "targetRef": { + "type": "string", + "description": "A JSON pointer reference indicating the target object." + } + } + }, + "PiiTask": { + "properties": { + "parameters": { + "properties": { + "domain": { + "default": "none", + "enum": [ + "phi", + "none" + ], + "type": "string" + }, + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": true, + "type": "boolean" + }, + "pii-categories": { + "$ref": "#/definitions/PiiCategories" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "EntitiesTask": { + "properties": { + "parameters": { + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "SentimentAnalysisTask": { + "properties": { + "parameters": { + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + }, + "opinionMining": { + "default": false, + "type": "boolean" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InnerError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "InvalidParameterValue", + "InvalidRequestBodyFormat", + "EmptyRequest", + "MissingInputRecords", + "InvalidDocument", + "ModelVersionIncorrect", + "InvalidDocumentBatch", + "UnsupportedLanguageCode", + "InvalidCountryHint" + ], + "x-ms-enum": { + "name": "InnerErrorCodeValue", + "modelAsString": true + }, + "description": "Error code." + }, + "message": { + "type": "string", + "description": "Error message." + }, + "details": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Error details." + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerError", + "description": "Inner error contains more specific information." + } + } + }, + "AnalyzeBatchInput": { + "allOf": [ + { + "$ref": "#/definitions/JobDescriptor" + }, + { + "$ref": "#/definitions/AnalysisInput" + }, + { + "$ref": "#/definitions/JobManifest" + } + ] + }, + "AnalyzeJobState": { + "allOf": [ + { + "$ref": "#/definitions/AnalyzeJobMetadata" + }, + { + "$ref": "#/definitions/TasksState" + }, + { + "$ref": "#/definitions/AnalyzeJobErrorsAndStatistics" + }, + { + "$ref": "#/definitions/Pagination" + } + ] + }, + "SentimentResponse": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Sentiment analysis per document.", + "items": { + "$ref": "#/definitions/DocumentSentiment" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "TaskState": { + "properties": { + "status": { + "enum": [ + "notStarted", + "running", + "succeeded", + "partiallySucceeded", + "failed", + "rejected", + "cancelled", + "cancelling" + ], + "x-ms-enum": { + "modelAsString": false, + "name": "State" + } + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "TasksState": { + "properties": { + "tasks": { + "properties": { + "details": { + "allOf": [ + { + "$ref": "#/definitions/TaskState" + } + ], + "entityRecognitionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/EntitiesTaskResult" + } + ] + } + }, + "entityRecognitionPiiTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/PiiTaskResult" + } + ] + } + }, + "keyPhraseExtractionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/KeyPhraseTaskResult" + } + ] + } + }, + "entityLinkingTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/EntityLinkingTaskResult" + } + ] + } + }, + "sentimentAnalysisTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/SentimentTaskResult" + } + ] + } + }, + "type": "object" + }, + "completed": { + "type": "integer" + }, + "failed": { + "type": "integer" + }, + "inProgress": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "required": [ + "total", + "completed", + "failed", + "inProgress" + ], + "type": "object" + } + }, + "required": [ + "tasks" + ], + "type": "object" + }, + "DocumentSentiment": { + "type": "object", + "required": [ + "id", + "sentiment", + "confidenceScores", + "sentences", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "sentiment": { + "type": "string", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", + "enum": [ + "positive", + "neutral", + "negative", + "mixed" + ], + "x-ms-enum": { + "name": "DocumentSentimentValue", + "modelAsString": false + } + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics" + }, + "confidenceScores": { + "description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.", + "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + }, + "sentences": { + "type": "array", + "description": "Sentence level sentiment analysis.", + "items": { + "$ref": "#/definitions/SentenceSentiment" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + } + } + }, + "RequestStatistics": { + "type": "object", + "required": [ + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount" + ], + "properties": { + "documentsCount": { + "type": "integer", + "format": "int32", + "description": "Number of documents submitted in the request." + }, + "validDocumentsCount": { + "type": "integer", + "format": "int32", + "description": "Number of valid documents. This excludes empty, over-size limit or non-supported languages documents." + }, + "erroneousDocumentsCount": { + "type": "integer", + "format": "int32", + "description": "Number of invalid documents. This includes empty, over-size limit or non-supported languages documents." + }, + "transactionsCount": { + "type": "integer", + "format": "int64", + "description": "Number of transactions for the request." + } + }, + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "DocumentStatistics": { + "type": "object", + "required": [ + "charactersCount", + "transactionsCount" + ], + "properties": { + "charactersCount": { + "type": "integer", + "format": "int32", + "description": "Number of text elements recognized in the document." + }, + "transactionsCount": { + "type": "integer", + "format": "int32", + "description": "Number of transactions for the document." + } + }, + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "SentimentConfidenceScorePerLabel": { + "type": "object", + "required": [ + "positive", + "neutral", + "negative" + ], + "properties": { + "positive": { + "type": "number", + "format": "double" + }, + "neutral": { + "type": "number", + "format": "double" + }, + "negative": { + "type": "number", + "format": "double" + } + }, + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." + }, + "SentenceSentiment": { + "type": "object", + "required": [ + "text", + "sentiment", + "confidenceScores", + "offset", + "length" + ], + "properties": { + "text": { + "type": "string", + "description": "The sentence text." + }, + "sentiment": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "neutral", + "negative" + ], + "x-ms-enum": { + "name": "SentenceSentimentValue", + "modelAsString": false + } + }, + "confidenceScores": { + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.", + "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The sentence offset from the start of the document." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the sentence." + }, + "targets": { + "type": "array", + "description": "The array of sentence targets for the sentence.", + "items": { + "$ref": "#/definitions/SentenceTarget" + } + }, + "assessments": { + "type": "array", + "description": "The array of assessments for the sentence.", + "items": { + "$ref": "#/definitions/SentenceAssessment" + } + } + } + }, + "SentenceTarget": { + "type": "object", + "required": [ + "confidenceScores", + "length", + "offset", + "relations", + "sentiment", + "text" + ], + "properties": { + "sentiment": { + "type": "string", + "enum": [ + "positive", + "mixed", + "negative" + ], + "x-ms-enum": { + "name": "TokenSentimentValue", + "modelAsString": false + }, + "description": "Targeted sentiment in the sentence." + }, + "confidenceScores": { + "description": "Target sentiment confidence scores for the target in the sentence.", + "$ref": "#/definitions/TargetConfidenceScoreLabel" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "text": { + "type": "string", + "description": "The target text detected." + }, + "relations": { + "type": "array", + "description": "The array of either assessment or target objects which is related to the target.", + "items": { + "$ref": "#/definitions/TargetRelation" + } + } + } + }, + "SentenceAssessment": { + "type": "object", + "required": [ + "confidenceScores", + "isNegated", + "length", + "offset", + "sentiment", + "text" + ], + "properties": { + "sentiment": { + "type": "string", + "enum": [ + "positive", + "mixed", + "negative" + ], + "x-ms-enum": { + "name": "TokenSentimentValue", + "modelAsString": false + }, + "description": "Assessment sentiment in the sentence." + }, + "confidenceScores": { + "description": "Assessment sentiment confidence scores in the sentence.", + "$ref": "#/definitions/TargetConfidenceScoreLabel" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The assessment offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the assessment." + }, + "text": { + "type": "string", + "description": "The assessment text detected." + }, + "isNegated": { + "type": "boolean", + "description": "The indicator representing if the assessment is negated." + } + } + }, + "TargetRelation": { + "type": "object", + "required": [ + "ref", + "relationType" + ], + "properties": { + "relationType": { + "type": "string", + "enum": [ + "assessment", + "target" + ], + "x-ms-enum": { + "name": "TargetRelationType", + "modelAsString": false + }, + "description": "The type related to the target." + }, + "ref": { + "type": "string", + "description": "The JSON pointer indicating the linked object." + } + } + }, + "TargetConfidenceScoreLabel": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "type": "number", + "format": "double" + }, + "negative": { + "type": "number", + "format": "double" + } + }, + "description": "Represents the confidence scores across all sentiment classes: positive, neutral, negative." + }, + "EntitiesResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentEntities" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentEntities": { + "type": "object", + "required": [ + "id", + "entities", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "PiiDocumentEntities": { + "type": "object", + "required": [ + "id", + "redactedText", + "entities", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "redactedText": { + "type": "string", + "description": "Returns redacted text." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "Entity": { + "type": "object", + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ], + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "type": "string", + "description": "Entity type." + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + } + } + }, + "EntityLinkingResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentLinkedEntities" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentLinkedEntities": { + "type": "object", + "required": [ + "id", + "entities", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "type": "array", + "description": "Recognized well known entities in the document.", + "items": { + "$ref": "#/definitions/LinkedEntity" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "HealthcareJobState": { + "allOf": [ + { + "$ref": "#/definitions/JobMetadata" + }, + { + "$ref": "#/definitions/HealthcareTaskResult" + }, + { + "$ref": "#/definitions/Pagination" + } + ] + }, + "HealthcareResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentHealthcareEntities" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentHealthcareEntities": { + "type": "object", + "required": [ + "id", + "entities", + "relations", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "description": "Healthcare entities.", + "type": "array", + "items": { + "$ref": "#/definitions/HealthcareEntity" + } + }, + "relations": { + "type": "array", + "description": "Healthcare entity relations.", + "items": { + "$ref": "#/definitions/HealthcareRelation" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "HealthcareEntity": { + "type": "object", + "allOf": [ + { + "type": "object", + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ], + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "x-ms-enum": { + "name": "healthcareCategory", + "modelAsString": true + }, + "type": "string", + "description": "Entity Category.", + "enum": [ + "BODY_STRUCTURE", + "AGE", + "GENDER", + "EXAMINATION_NAME", + "DATE", + "DIRECTION", + "FREQUENCY", + "MEASUREMENT_VALUE", + "MEASUREMENT_UNIT", + "RELATIONAL_OPERATOR", + "TIME", + "GENE_OR_PROTEIN", + "VARIANT", + "ADMINISTRATIVE_EVENT", + "CARE_ENVIRONMENT", + "HEALTHCARE_PROFESSION", + "DIAGNOSIS", + "SYMPTOM_OR_SIGN", + "CONDITION_QUALIFIER", + "MEDICATION_CLASS", + "MEDICATION_NAME", + "DOSAGE", + "MEDICATION_FORM", + "MEDICATION_ROUTE", + "FAMILY_RELATION", + "TREATMENT_NAME" + ] + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + } + } + }, + { + "$ref": "#/definitions/HealthcareLinkingProperties" + } + ] + }, + "HealthcareRelation": { + "type": "object", + "description": "Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.", + "required": [ + "relationType", + "entities" + ], + "properties": { + "relationType": { + "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc.", + "type": "string", + "enum": [ + "Abbreviation", + "DirectionOfBodyStructure", + "DirectionOfCondition", + "DirectionOfExamination", + "DirectionOfTreatment", + "DosageOfMedication", + "FormOfMedication", + "FrequencyOfMedication", + "FrequencyOfTreatment", + "QualifierOfCondition", + "RelationOfExamination", + "RouteOfMedication", + "TimeOfCondition", + "TimeOfEvent", + "TimeOfExamination", + "TimeOfMedication", + "TimeOfTreatment", + "UnitOfCondition", + "UnitOfExamination", + "ValueOfCondition", + "ValueOfExamination" + ], + "x-ms-enum": { + "name": "relationType", + "modelAsString": true + } + }, + "entities": { + "description": "The entities in the relation.", + "type": "array", + "items": { + "$ref": "#/definitions/HealthcareRelationEntity" + } + } + } + }, + "HealthcareAssertion": { + "type": "object", + "properties": { + "conditionality": { + "description": "Describes any conditionality on the entity.", + "type": "string", + "enum": [ + "hypothetical", + "conditional" + ], + "x-ms-enum": { + "name": "Conditionality", + "modelAsString": false + } + }, + "certainty": { + "description": "Describes the entities certainty and polarity.", + "type": "string", + "enum": [ + "positive", + "positivePossible", + "neutralPossible", + "negativePossible", + "negative" + ], + "x-ms-enum": { + "name": "Certainty", + "modelAsString": false + } + }, + "association": { + "description": "Describes if the entity is the subject of the text or if it describes someone else.", + "type": "string", + "enum": [ + "subject", + "other" + ], + "x-ms-enum": { + "name": "Association", + "modelAsString": false + } + } + } + }, + "HealthcareRelationEntity": { + "type": "object", + "required": [ + "ref", + "role" + ], + "properties": { + "ref": { + "description": "Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity .", + "type": "string" + }, + "role": { + "description": "Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis).", + "type": "string" + } + } + }, + "HealthcareEntityLink": { + "type": "object", + "required": [ + "dataSource", + "id" + ], + "properties": { + "dataSource": { + "description": "Entity Catalog. Examples include: UMLS, CHV, MSH, etc.", + "type": "string" + }, + "id": { + "description": "Entity id in the given source catalog.", + "type": "string" + } + } + }, + "HealthcareLinkingProperties": { + "properties": { + "assertion": { + "type": "object", + "$ref": "#/definitions/HealthcareAssertion" + }, + "name": { + "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'.", + "type": "string" + }, + "links": { + "description": "Entity references in known data sources.", + "type": "array", + "items": { + "$ref": "#/definitions/HealthcareEntityLink" + } + } + } + }, + "LinkedEntity": { + "type": "object", + "required": [ + "name", + "matches", + "language", + "url", + "dataSource" + ], + "properties": { + "name": { + "type": "string", + "description": "Entity Linking formal name." + }, + "matches": { + "type": "array", + "description": "List of instances this entity appears in the text.", + "items": { + "$ref": "#/definitions/Match" + } + }, + "language": { + "type": "string", + "description": "Language used in the data source." + }, + "id": { + "type": "string", + "description": "Unique identifier of the recognized entity from the data source." + }, + "url": { + "type": "string", + "description": "URL for the entity's page from the data source." + }, + "dataSource": { + "type": "string", + "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + }, + "bingId": { + "type": "string", + "description": "Bing Entity Search API unique identifier of the recognized entity." + } + } + }, + "Match": { + "type": "object", + "required": [ + "confidenceScore", + "text", + "offset", + "length" + ], + "properties": { + "confidenceScore": { + "type": "number", + "format": "double", + "description": "If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + }, + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity match text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity match text." + } + } + }, + "AnalysisInput": { + "type": "object", + "required": [ + "analysisInput" + ], + "properties": { + "analysisInput": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } + } + }, + "EntitiesTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/EntitiesResult" + } + } + }, + "PiiTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/PiiResult" + } + } + }, + "KeyPhraseTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/KeyPhraseResult" + } + } + }, + "EntityLinkingTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/EntityLinkingResult" + } + } + }, + "SentimentTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/SentimentResponse" + } + } + }, + "HealthcareTaskResult": { + "properties": { + "results": { + "$ref": "#/definitions/HealthcareResult" + }, + "errors": { + "items": { + "$ref": "#/definitions/TextAnalyticsError" + }, + "type": "array" + } + }, + "type": "object" + }, + "JobDescriptor": { + "properties": { + "displayName": { + "description": "Optional display name for the analysis job.", + "type": "string" + } + }, + "type": "object" + }, + "JobMetadata": { + "properties": { + "createdDateTime": { + "format": "date-time", + "type": "string" + }, + "expirationDateTime": { + "format": "date-time", + "type": "string" + }, + "jobId": { + "format": "uuid", + "type": "string" + }, + "lastUpdateDateTime": { + "format": "date-time", + "type": "string" + }, + "status": { + "enum": [ + "notStarted", + "running", + "succeeded", + "failed", + "cancelled", + "cancelling", + "partiallyCompleted" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": false, + "name": "State" + } + } + }, + "required": [ + "jobId", + "lastUpdateDateTime", + "createdDateTime", + "status" + ], + "type": "object" + }, + "AnalyzeJobDisplayName": { + "properties": { + "displayName": { + "type": "string" + } + } + }, + "AnalyzeJobMetadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/JobMetadata" + }, + { + "$ref": "#/definitions/AnalyzeJobDisplayName" + } + ] + }, + "AnalyzeJobErrorsAndStatistics": { + "properties": { + "errors": { + "items": { + "$ref": "#/definitions/TextAnalyticsError" + }, + "type": "array" + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + } + }, + "type": "object" + }, + "KeyPhraseResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentKeyPhrases" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentKeyPhrases": { + "type": "object", + "required": [ + "id", + "keyPhrases", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "keyPhrases": { + "type": "array", + "description": "A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document.", + "items": { + "type": "string" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "KeyPhrasesTask": { + "properties": { + "parameters": { + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "EntityLinkingTask": { + "properties": { + "parameters": { + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "LanguageBatchInput": { + "type": "object", + "required": [ + "documents" + ], + "properties": { + "documents": { + "type": "array", + "items": { + "$ref": "#/definitions/LanguageInput" + } + } + } + }, + "LanguageInput": { + "type": "object", + "required": [ + "id", + "text" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "text": { + "type": "string" + }, + "countryHint": { + "type": "string" + } + } + }, + "Pagination": { + "properties": { + "@nextLink": { + "type": "string" + } + }, + "type": "object" + }, + "PiiResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/PiiDocumentEntities" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "LanguageResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentLanguage" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentLanguage": { + "type": "object", + "required": [ + "id", + "detectedLanguage", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "detectedLanguage": { + "description": "Detected Language.", + "$ref": "#/definitions/DetectedLanguage" + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "DetectedLanguage": { + "type": "object", + "required": [ + "name", + "iso6391Name", + "confidenceScore" + ], + "properties": { + "name": { + "type": "string", + "description": "Long name of a detected language (e.g. English, French)." + }, + "iso6391Name": { + "type": "string", + "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." + } + } + }, + "StringIndexType": { + "default": "TextElement_v8", + "enum": [ + "TextElement_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "value": "TextElement_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + }, + "type": "string" + }, + "PiiCategories": { + "description": "(Optional) describes the PII categories to return", + "items": { + "type": "string", + "x-ms-enum": { + "name": "PiiCategory", + "modelAsString": true + }, + "enum": [ + "ABARoutingNumber", + "ARNationalIdentityNumber", + "AUBankAccountNumber", + "AUDriversLicenseNumber", + "AUMedicalAccountNumber", + "AUPassportNumber", + "AUTaxFileNumber", + "AUBusinessNumber", + "AUCompanyNumber", + "ATIdentityCard", + "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", + "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", + "AzurePublishSettingPassword", + "AzureRedisCacheString", + "AzureSAS", + "AzureServiceBusString", + "AzureStorageAccountKey", + "AzureStorageAccountGeneric", + "BENationalNumber", + "BENationalNumberV2", + "BEValueAddedTaxNumber", + "BRCPFNumber", + "BRLegalEntityNumber", + "BRNationalIDRG", + "BGUniformCivilNumber", + "CABankAccountNumber", + "CADriversLicenseNumber", + "CAHealthServiceNumber", + "CAPassportNumber", + "CAPersonalHealthIdentification", + "CASocialInsuranceNumber", + "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", + "CreditCardNumber", + "HRIdentityCardNumber", + "HRNationalIDNumber", + "HRPersonalIdentificationNumber", + "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", + "CYTaxIdentificationNumber", + "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", + "DKPersonalIdentificationNumber", + "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", + "EEPersonalIdentificationCode", + "EUDebitCardNumber", + "EUDriversLicenseNumber", + "EUGPSCoordinates", + "EUNationalIdentificationNumber", + "EUPassportNumber", + "EUSocialSecurityNumber", + "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", + "FINationalID", + "FINationalIDV2", + "FIPassportNumber", + "FRDriversLicenseNumber", + "FRHealthInsuranceNumber", + "FRNationalID", + "FRPassportNumber", + "FRSocialSecurityNumber", + "FRTaxIdentificationNumber", + "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", + "DEPassportNumber", + "DEIdentityCardNumber", + "DETaxIdentificationNumber", + "DEValueAddedNumber", + "GRNationalIDCard", + "GRNationalIDV2", + "GRTaxIdentificationNumber", + "HKIdentityCardNumber", + "HUValueAddedNumber", + "HUPersonalIdentificationNumber", + "HUTaxIdentificationNumber", + "INPermanentAccount", + "INUniqueIdentificationNumber", + "IDIdentityCardNumber", + "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", + "IEPersonalPublicServiceNumberV2", + "ILBankAccountNumber", + "ILNationalID", + "ITDriversLicenseNumber", + "ITFiscalCode", + "ITValueAddedTaxNumber", + "JPBankAccountNumber", + "JPDriversLicenseNumber", + "JPPassportNumber", + "JPResidentRegistrationNumber", + "JPSocialInsuranceNumber", + "JPMyNumberCorporate", + "JPMyNumberPersonal", + "JPResidenceCardNumber", + "LVPersonalCode", + "LTPersonalCode", + "LUNationalIdentificationNumberNatural", + "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", + "MTIdentityCardNumber", + "MTTaxIDNumber", + "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", + "NLTaxIdentificationNumber", + "NLValueAddedTaxNumber", + "NZBankAccountNumber", + "NZDriversLicenseNumber", + "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", + "NZSocialWelfareNumber", + "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", + "PLIdentityCard", + "PLNationalID", + "PLNationalIDV2", + "PLPassportNumber", + "PLTaxIdentificationNumber", + "PLREGONNumber", + "PTCitizenCardNumber", + "PTCitizenCardNumberV2", + "PTTaxIdentificationNumber", + "ROPersonalNumericalCode", + "RUPassportNumberDomestic", + "RUPassportNumberInternational", + "SANationalID", + "SGNationalRegistrationIdentityCardNumber", + "SKPersonalNumber", + "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", + "ZAIdentificationNumber", + "KRResidentRegistrationNumber", + "ESDNI", + "ESSocialSecurityNumber", + "ESTaxIdentificationNumber", + "SQLServerConnectionString", + "SENationalID", + "SENationalIDV2", + "SEPassportNumber", + "SETaxIdentificationNumber", + "SWIFTCode", + "CHSocialSecurityNumber", + "TWNationalID", + "TWPassportNumber", + "TWResidentCertificate", + "THPopulationIdentificationCode", + "TRNationalIdentificationNumber", + "UKDriversLicenseNumber", + "UKElectoralRollNumber", + "UKNationalHealthNumber", + "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", + "USUKPassportNumber", + "USBankAccountNumber", + "USDriversLicenseNumber", + "USIndividualTaxpayerIdentification", + "USSocialSecurityNumber", + "UAPassportNumberDomestic", + "UAPassportNumberInternational", + "Organization", + "Email", + "URL", + "Age", + "PhoneNumber", + "IPAddress", + "Date", + "Person", + "Address", + "All", + "Default" + ] + }, + "type": "array", + "uniqueItems": true + }, + "HealthcareCategories": { + "description": "Describes the health entity categories which will be returned", + "items": { + "type": "string", + "x-ms-enum": { + "name": "HealthcareCategories", + "modelAsString": true + }, + "enum": [ + "BODY_STRUCTURE", + "AGE", + "GENDER", + "EXAMINATION_NAME", + "DATE", + "DIRECTION", + "FREQUENCY", + "MEASUREMENT_VALUE", + "MEASUREMENT_UNIT", + "RELATIONAL_OPERATOR", + "TIME", + "GENE_OR_PROTEIN", + "VARIANT", + "ADMINISTRATIVE_EVENT", + "CARE_ENVIRONMENT", + "HEALTHCARE_PROFESSION", + "DIAGNOSIS", + "SYMPTOM_OR_SIGN", + "CONDITION_QUALIFIER", + "MEDICATION_CLASS", + "MEDICATION_NAME", + "DOSAGE", + "MEDICATION_FORM", + "MEDICATION_ROUTE", + "FAMILY_RELATION", + "TREATMENT_NAME" + ] + }, + "type": "array", + "uniqueItems": true + } + }, + "parameters": { + "ApiVersion": { + "name": "ApiVersion", + "description": "Text Analytics API version (for example, v3.0).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "enum": [ + "v3.1" + ], + "in": "path", + "x-ms-skip-url-encoding": true + }, + "Endpoint": { + "name": "Endpoint", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + }, + "StringIndexType": { + "name": "stringIndexType", + "in": "query", + "type": "string", + "description": "(Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets", + "default": "TextElement_v8", + "enum": [ + "TextElement_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "value": "TextElement_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + }, + "x-ms-parameter-location": "method" + }, + "PiiCategories": { + "description": "(Optional) describes the PII categories to return", + "in": "query", + "collectionFormat": "csv", + "items": { + "type": "string", + "x-ms-enum": { + "name": "PiiCategory", + "modelAsString": true + }, + "enum": [ + "ABARoutingNumber", + "ARNationalIdentityNumber", + "AUBankAccountNumber", + "AUDriversLicenseNumber", + "AUMedicalAccountNumber", + "AUPassportNumber", + "AUTaxFileNumber", + "AUBusinessNumber", + "AUCompanyNumber", + "ATIdentityCard", + "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", + "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", + "AzurePublishSettingPassword", + "AzureRedisCacheString", + "AzureSAS", + "AzureServiceBusString", + "AzureStorageAccountKey", + "AzureStorageAccountGeneric", + "BENationalNumber", + "BENationalNumberV2", + "BEValueAddedTaxNumber", + "BRCPFNumber", + "BRLegalEntityNumber", + "BRNationalIDRG", + "BGUniformCivilNumber", + "CABankAccountNumber", + "CADriversLicenseNumber", + "CAHealthServiceNumber", + "CAPassportNumber", + "CAPersonalHealthIdentification", + "CASocialInsuranceNumber", + "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", + "CreditCardNumber", + "HRIdentityCardNumber", + "HRNationalIDNumber", + "HRPersonalIdentificationNumber", + "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", + "CYTaxIdentificationNumber", + "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", + "DKPersonalIdentificationNumber", + "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", + "EEPersonalIdentificationCode", + "EUDebitCardNumber", + "EUDriversLicenseNumber", + "EUGPSCoordinates", + "EUNationalIdentificationNumber", + "EUPassportNumber", + "EUSocialSecurityNumber", + "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", + "FINationalID", + "FINationalIDV2", + "FIPassportNumber", + "FRDriversLicenseNumber", + "FRHealthInsuranceNumber", + "FRNationalID", + "FRPassportNumber", + "FRSocialSecurityNumber", + "FRTaxIdentificationNumber", + "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", + "DEPassportNumber", + "DEIdentityCardNumber", + "DETaxIdentificationNumber", + "DEValueAddedNumber", + "GRNationalIDCard", + "GRNationalIDV2", + "GRTaxIdentificationNumber", + "HKIdentityCardNumber", + "HUValueAddedNumber", + "HUPersonalIdentificationNumber", + "HUTaxIdentificationNumber", + "INPermanentAccount", + "INUniqueIdentificationNumber", + "IDIdentityCardNumber", + "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", + "IEPersonalPublicServiceNumberV2", + "ILBankAccountNumber", + "ILNationalID", + "ITDriversLicenseNumber", + "ITFiscalCode", + "ITValueAddedTaxNumber", + "JPBankAccountNumber", + "JPDriversLicenseNumber", + "JPPassportNumber", + "JPResidentRegistrationNumber", + "JPSocialInsuranceNumber", + "JPMyNumberCorporate", + "JPMyNumberPersonal", + "JPResidenceCardNumber", + "LVPersonalCode", + "LTPersonalCode", + "LUNationalIdentificationNumberNatural", + "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", + "MTIdentityCardNumber", + "MTTaxIDNumber", + "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", + "NLTaxIdentificationNumber", + "NLValueAddedTaxNumber", + "NZBankAccountNumber", + "NZDriversLicenseNumber", + "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", + "NZSocialWelfareNumber", + "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", + "PLIdentityCard", + "PLNationalID", + "PLNationalIDV2", + "PLPassportNumber", + "PLTaxIdentificationNumber", + "PLREGONNumber", + "PTCitizenCardNumber", + "PTCitizenCardNumberV2", + "PTTaxIdentificationNumber", + "ROPersonalNumericalCode", + "RUPassportNumberDomestic", + "RUPassportNumberInternational", + "SANationalID", + "SGNationalRegistrationIdentityCardNumber", + "SKPersonalNumber", + "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", + "ZAIdentificationNumber", + "KRResidentRegistrationNumber", + "ESDNI", + "ESSocialSecurityNumber", + "ESTaxIdentificationNumber", + "SQLServerConnectionString", + "SENationalID", + "SENationalIDV2", + "SEPassportNumber", + "SETaxIdentificationNumber", + "SWIFTCode", + "CHSocialSecurityNumber", + "TWNationalID", + "TWPassportNumber", + "TWResidentCertificate", + "THPopulationIdentificationCode", + "TRNationalIdentificationNumber", + "UKDriversLicenseNumber", + "UKElectoralRollNumber", + "UKNationalHealthNumber", + "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", + "USUKPassportNumber", + "USBankAccountNumber", + "USDriversLicenseNumber", + "USIndividualTaxpayerIdentification", + "USSocialSecurityNumber", + "UAPassportNumberDomestic", + "UAPassportNumberInternational", + "Organization", + "Email", + "URL", + "Age", + "PhoneNumber", + "IPAddress", + "Date", + "Person", + "Address", + "All", + "Default" + ] + }, + "name": "piiCategories", + "required": false, + "type": "array", + "uniqueItems": true, + "x-ms-parameter-location": "method" + }, + "JobId": { + "description": "Job ID", + "format": "uuid", + "in": "path", + "name": "jobId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "AnalyzeJobId": { + "description": "Job ID for Analyze", + "in": "path", + "name": "jobId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ShowStats": { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "type": "boolean", + "required": false, + "x-ms-parameter-location": "method" + }, + "LoggingOptOut": { + "name": "loggingOptOut", + "in": "query", + "description": "(Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language processing functions. Setting this parameter to true, disables input logging and may limit our ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI principles at https://www.microsoft.com/en-us/ai/responsible-ai.", + "type": "boolean", + "required": false, + "x-ms-parameter-location": "method" + }, + "ModelVersion": { + "name": "model-version", + "in": "query", + "description": "(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. ", + "type": "string", + "required": false, + "x-ms-parameter-location": "method" + }, + "MultiLanguageInput": { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + }, + "x-ms-parameter-location": "method" + }, + "LanguageInput": { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze for language endpoint.", + "required": true, + "schema": { + "$ref": "#/definitions/LanguageBatchInput" + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json new file mode 100644 index 000000000000..e1b8c498d32d --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "input": { + "displayName": "Extracting Location & US Region", + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "id": "2", + "language": "en", + "text": "I'm flying to NYC tomorrow. See you there." + } + ] + }, + "tasks": { + "entityRecognitionTasks": [ + { + "parameters": { + "model-version": "latest" + } + } + ] + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/text/analytics/v3.1-preview.5/analyze/jobs/{jobId}" + } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "InvalidRequest", + "message": "Invalid Request.", + "innererror": { + "code": "MissingInputRecords", + "message": "Missing input records." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json new file mode 100644 index 000000000000..93d23bfe90a3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Extracting Location & US Region", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "entityRecognitionTasks": [ + { + "name": "Recognize Entities (2020-04-01)", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "entities": [ + { + "category": "Event", + "confidenceScore": 0.61, + "length": 4, + "offset": 18, + "text": "trip" + }, + { + "category": "Location", + "confidenceScore": 0.82, + "length": 7, + "offset": 26, + "subcategory": "GPE", + "text": "Seattle" + }, + { + "category": "DateTime", + "confidenceScore": 0.8, + "length": 9, + "offset": 34, + "subcategory": "DateRange", + "text": "last week" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "confidenceScore": 0.52, + "length": 3, + "offset": 14, + "subcategory": "GPE", + "text": "NYC" + }, + { + "category": "DateTime", + "confidenceScore": 0.8, + "length": 8, + "offset": 18, + "subcategory": "Date", + "text": "tomorrow" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "NotFound", + "message": "Not Found", + "innererror": { + "code": "JobIdNotFound", + "message": "Job ID not found." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json new file mode 100644 index 000000000000..d6c9a0221153 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "entities": [ + { + "category": "Organization", + "confidenceScore": 0.84, + "length": 9, + "offset": 0, + "text": "Microsoft" + }, + { + "category": "Person", + "confidenceScore": 0.85, + "length": 10, + "offset": 25, + "text": "Bill Gates" + }, + { + "category": "Person", + "confidenceScore": 0.9, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "confidenceScore": 0.55, + "length": 7, + "offset": 33, + "subcategory": "GPE", + "text": "Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "InvalidRequest", + "message": "Invalid Request.", + "innererror": { + "code": "MissingInputRecords", + "message": "Missing input records." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json new file mode 100644 index 000000000000..998ac1d65bab --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Bill Gates", + "language": "en", + "matches": [ + { + "confidenceScore": 0.52, + "length": 10, + "offset": 25, + "text": "Bill Gates" + } + ], + "name": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates" + }, + { + "dataSource": "Wikipedia", + "id": "Paul Allen", + "language": "en", + "matches": [ + { + "confidenceScore": 0.54, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "name": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen" + }, + { + "dataSource": "Wikipedia", + "id": "Microsoft", + "language": "en", + "matches": [ + { + "confidenceScore": 0.49, + "length": 9, + "offset": 0, + "text": "Microsoft" + } + ], + "name": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Pike Place Market", + "language": "en", + "matches": [ + { + "confidenceScore": 0.86, + "length": 17, + "offset": 0, + "text": "Pike place market" + } + ], + "name": "Pike Place Market", + "url": "https://en.wikipedia.org/wiki/Pike_Place_Market" + }, + { + "dataSource": "Wikipedia", + "id": "Seattle", + "language": "en", + "matches": [ + { + "confidenceScore": 0.27, + "length": 7, + "offset": 33, + "text": "Seattle" + } + ], + "name": "Seattle", + "url": "https://en.wikipedia.org/wiki/Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-02-01" + } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "InvalidRequest", + "message": "Invalid Request.", + "innererror": { + "code": "MissingInputRecords", + "message": "Missing input records." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json new file mode 100644 index 000000000000..d125525bda91 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "My SSN is 859-98-0987" + }, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + }, + { + "id": "3", + "language": "en", + "text": "Is 998.214.865-68 your Brazilian CPF number?" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "redactedText": "My SSN is ***********", + "entities": [ + { + "category": "U.S. Social Security Number (SSN)", + "confidenceScore": 0.65, + "length": 11, + "offset": 28, + "text": "859-98-0987" + } + ], + "warnings": [] + }, + { + "id": "2", + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", + "entities": [ + { + "category": "ABA Routing Number", + "confidenceScore": 0.75, + "length": 9, + "offset": 18, + "text": "111000025" + } + ], + "warnings": [] + }, + { + "id": "3", + "redactedText": "Is ************** your Brazilian CPF number?", + "entities": [ + { + "category": "Brazil CPF Number", + "confidenceScore": 0.85, + "length": 14, + "offset": 3, + "text": "998.214.865-68" + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2019-10-01" + } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "InvalidRequest", + "message": "Invalid Request.", + "innererror": { + "code": "MissingInputRecords", + "message": "Missing input records." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json new file mode 100644 index 000000000000..569ae75df649 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/text/analytics/v3.1-preview.5/entities/healthcare/jobs/{jobId}" + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "NotFound", + "message": "Not Found", + "innererror": { + "code": "JobIdNotFound", + "message": "Job ID not found." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json new file mode 100644 index 000000000000..2fa1e9978902 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Subject is taking 100mg of ibuprofen twice daily." + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/text/analytics/v3.1-preview.5/entities/healthcare/jobs/{jobId}" + } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "InvalidRequest", + "message": "Invalid Request.", + "innererror": { + "code": "MissingInputRecords", + "message": "Missing input records." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json new file mode 100644 index 000000000000..1bb24e508072 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json @@ -0,0 +1,227 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:01:03Z", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "offset": 18, + "length": 5, + "text": "100mg", + "category": "Dosage", + "confidenceScore": 0.99 + }, + { + "offset": 27, + "length": 9, + "text": "ibuprofen", + "category": "MedicationName", + "confidenceScore": 1.0, + "assertion": { + "certainty": "positive" + }, + "links": [ + { + "id": "C0020740", + "dataSource": "UMLS" + }, + { + "id": "0000019879", + "dataSource": "AOD" + }, + { + "id": "M01AE01", + "dataSource": "ATC" + }, + { + "id": "0046165", + "dataSource": "CCPSS" + }, + { + "id": "0000006519", + "dataSource": "CHV" + }, + { + "id": "2270-2077", + "dataSource": "CSP" + }, + { + "id": "DB01050", + "dataSource": "DRUGBANK" + }, + { + "id": "1611", + "dataSource": "GS" + }, + { + "id": "sh97005926", + "dataSource": "LCH_NW" + }, + { + "id": "LP16165-0", + "dataSource": "LNC" + }, + { + "id": "40458", + "dataSource": "MEDCIN" + }, + { + "id": "d00015", + "dataSource": "MMSL" + }, + { + "id": "D007052", + "dataSource": "MSH" + }, + { + "id": "WK2XYI10QM", + "dataSource": "MTHSPL" + }, + { + "id": "C561", + "dataSource": "NCI" + }, + { + "id": "C561", + "dataSource": "NCI_CTRP" + }, + { + "id": "00803", + "dataSource": "NCI_DCP" + }, + { + "id": "NSC0256857", + "dataSource": "NCI_DTP" + }, + { + "id": "WK2XYI10QM", + "dataSource": "NCI_FDA" + }, + { + "id": "CDR0000613511", + "dataSource": "NCI_NCI-GLOSS" + }, + { + "id": "002377", + "dataSource": "NDDF" + }, + { + "id": "CDR0000040475", + "dataSource": "PDQ" + }, + { + "id": "x02MO", + "dataSource": "RCD" + }, + { + "id": "5640", + "dataSource": "RXNORM" + }, + { + "id": "E-7772", + "dataSource": "SNM" + }, + { + "id": "C-603C0", + "dataSource": "SNMI" + }, + { + "id": "387207008", + "dataSource": "SNOMEDCT_US" + }, + { + "id": "m39860", + "dataSource": "USP" + }, + { + "id": "MTHU000060", + "dataSource": "USPMG" + }, + { + "id": "4017840", + "dataSource": "VANDF" + } + ] + }, + { + "offset": 37, + "length": 11, + "text": "twice daily", + "category": "Frequency", + "confidenceScore": 1 + } + ], + "relations": [ + { + "relationType": "DosageOfMedication", + "entities": [ + { + "ref": "#/documents/0/entities/0", + "role": "Attribute" + }, + { + "ref": "#/documents/0/entities/1", + "role": "Entity" + } + ] + }, + { + "relationType": "FrequencyOfMedication", + "entities": [ + { + "ref": "#/documents/0/entities/2", + "role": "Attribute" + }, + { + "ref": "#/documents/0/entities/1", + "role": "Entity" + } + ] + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-05-08" + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "NotFound", + "message": "Not Found", + "innererror": { + "code": "JobIdNotFound", + "message": "Job ID not found." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json new file mode 100644 index 000000000000..f45b74e027f5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Text Analytics is one of the Azure Cognitive Services." + }, + { + "id": "3", + "language": "en", + "text": "My cat might need to see a veterinarian." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "2", + "keyPhrases": [ + "Azure Cognitive Services", + "Text Analytics" + ], + "warnings": [] + }, + { + "id": "3", + "keyPhrases": [ + "cat", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2019-10-01" + } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "InvalidRequest", + "message": "Invalid Request.", + "innererror": { + "code": "MissingInputRecords", + "message": "Missing input records." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json new file mode 100644 index 000000000000..b1077b92db58 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "text": "Hello world" + }, + { + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "id": "3", + "text": "Hola mundo" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "en", + "name": "English" + }, + "id": "1", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "fr", + "name": "French" + }, + "id": "2", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "es", + "name": "Spanish" + }, + "id": "3", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "InvalidRequest", + "message": "Invalid Request.", + "innererror": { + "code": "MissingInputRecords", + "message": "Missing input records." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json new file mode 100644 index 000000000000..c751289f2ac1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json @@ -0,0 +1,160 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "id": "1", + "sentences": [ + { + "targets": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "length": 10, + "offset": 6, + "relations": [ + { + "ref": "#/documents/0/sentences/0/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "atmosphere" + } + ], + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "length": 17, + "offset": 0, + "assessments": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "isNegated": false, + "length": 5, + "offset": 0, + "sentiment": "positive", + "text": "great" + } + ], + "sentiment": "positive", + "text": "Great atmosphere." + }, + { + "targets": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 11, + "offset": 37, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "restaurants" + }, + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 6, + "offset": 50, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "hotels" + } + ], + "confidenceScores": { + "negative": 0.01, + "neutral": 0.86, + "positive": 0.13 + }, + "length": 52, + "offset": 18, + "assessments": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "isNegated": false, + "length": 15, + "offset": 18, + "sentiment": "positive", + "text": "Close to plenty" + } + ], + "sentiment": "neutral", + "text": "Close to plenty of restaurants, hotels, and transit!" + } + ], + "sentiment": "positive", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "InvalidRequest", + "message": "Invalid Request.", + "innererror": { + "code": "MissingInputRecords", + "message": "Missing input records." + } + } + } + }, + "500": { + "headers": {}, + "body": { + "error": { + "code": "InternalServerError", + "message": "Internal Server Error" + } + } + } + } +} From a98014cf0ea38fad07a86ad3b8ae1a6a1e95b70e Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 24 May 2021 14:02:30 -0700 Subject: [PATCH 02/26] WIP - updated healthcare entity --- .../stable/v3.1/TextAnalytics.json | 180 +++++++----------- 1 file changed, 70 insertions(+), 110 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 3906353f6393..3aad888d8797 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1082,6 +1082,76 @@ "modelAsString": false, "name": "State" } + }, + "entityRecognitionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/EntitiesTaskResult" + } + ] + } + }, + "entityRecognitionPiiTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/PiiTaskResult" + } + ] + } + }, + "keyPhraseExtractionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/KeyPhraseTaskResult" + } + ] + } + }, + "entityLinkingTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/EntityLinkingTaskResult" + } + ] + } + }, + "sentimentAnalysisTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/SentimentTaskResult" + } + ] + } } }, "required": [ @@ -1099,76 +1169,6 @@ "$ref": "#/definitions/TaskState" } ], - "entityRecognitionTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/EntitiesTaskResult" - } - ] - } - }, - "entityRecognitionPiiTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/PiiTaskResult" - } - ] - } - }, - "keyPhraseExtractionTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/KeyPhraseTaskResult" - } - ] - } - }, - "entityLinkingTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/EntityLinkingTaskResult" - } - ] - } - }, - "sentimentAnalysisTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/SentimentTaskResult" - } - ] - } - }, "type": "object" }, "completed": { @@ -2725,46 +2725,6 @@ }, "type": "array", "uniqueItems": true - }, - "HealthcareCategories": { - "description": "Describes the health entity categories which will be returned", - "items": { - "type": "string", - "x-ms-enum": { - "name": "HealthcareCategories", - "modelAsString": true - }, - "enum": [ - "BODY_STRUCTURE", - "AGE", - "GENDER", - "EXAMINATION_NAME", - "DATE", - "DIRECTION", - "FREQUENCY", - "MEASUREMENT_VALUE", - "MEASUREMENT_UNIT", - "RELATIONAL_OPERATOR", - "TIME", - "GENE_OR_PROTEIN", - "VARIANT", - "ADMINISTRATIVE_EVENT", - "CARE_ENVIRONMENT", - "HEALTHCARE_PROFESSION", - "DIAGNOSIS", - "SYMPTOM_OR_SIGN", - "CONDITION_QUALIFIER", - "MEDICATION_CLASS", - "MEDICATION_NAME", - "DOSAGE", - "MEDICATION_FORM", - "MEDICATION_ROUTE", - "FAMILY_RELATION", - "TREATMENT_NAME" - ] - }, - "type": "array", - "uniqueItems": true } }, "parameters": { From 606580c2b8e1ea5f018a8c13b7c2d8b005c1eac4 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 24 May 2021 14:08:25 -0700 Subject: [PATCH 03/26] WIP - fix indent --- .../stable/v3.1/TextAnalytics.json | 140 +++++++++--------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 3aad888d8797..cedbdad89dc1 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1813,76 +1813,76 @@ "type": "object", "allOf": [ { - "type": "object", - "required": [ - "text", - "category", - "offset", - "length", - "confidenceScore" - ], - "properties": { - "text": { - "type": "string", - "description": "Entity text as appears in the request." - }, - "category": { - "x-ms-enum": { - "name": "healthcareCategory", - "modelAsString": true - }, - "type": "string", - "description": "Entity Category.", - "enum": [ - "BODY_STRUCTURE", - "AGE", - "GENDER", - "EXAMINATION_NAME", - "DATE", - "DIRECTION", - "FREQUENCY", - "MEASUREMENT_VALUE", - "MEASUREMENT_UNIT", - "RELATIONAL_OPERATOR", - "TIME", - "GENE_OR_PROTEIN", - "VARIANT", - "ADMINISTRATIVE_EVENT", - "CARE_ENVIRONMENT", - "HEALTHCARE_PROFESSION", - "DIAGNOSIS", - "SYMPTOM_OR_SIGN", - "CONDITION_QUALIFIER", - "MEDICATION_CLASS", - "MEDICATION_NAME", - "DOSAGE", - "MEDICATION_FORM", - "MEDICATION_ROUTE", - "FAMILY_RELATION", - "TREATMENT_NAME" - ] - }, - "subcategory": { - "type": "string", - "description": "(Optional) Entity sub type." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted entity." - } - } - }, + "type": "object", + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ], + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "x-ms-enum": { + "name": "healthcareCategory", + "modelAsString": true + }, + "type": "string", + "description": "Entity Category.", + "enum": [ + "BODY_STRUCTURE", + "AGE", + "GENDER", + "EXAMINATION_NAME", + "DATE", + "DIRECTION", + "FREQUENCY", + "MEASUREMENT_VALUE", + "MEASUREMENT_UNIT", + "RELATIONAL_OPERATOR", + "TIME", + "GENE_OR_PROTEIN", + "VARIANT", + "ADMINISTRATIVE_EVENT", + "CARE_ENVIRONMENT", + "HEALTHCARE_PROFESSION", + "DIAGNOSIS", + "SYMPTOM_OR_SIGN", + "CONDITION_QUALIFIER", + "MEDICATION_CLASS", + "MEDICATION_NAME", + "DOSAGE", + "MEDICATION_FORM", + "MEDICATION_ROUTE", + "FAMILY_RELATION", + "TREATMENT_NAME" + ] + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + } + } + }, { "$ref": "#/definitions/HealthcareLinkingProperties" } From 5ec4c61988de11f538b75f64b80d73c570699c92 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 24 May 2021 14:20:24 -0700 Subject: [PATCH 04/26] WIP - update readme --- .../cognitiveservices/data-plane/TextAnalytics/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md index 3565ecfa5880..dfff6a1c03da 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md +++ b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md @@ -116,6 +116,14 @@ These settings apply only when `--tag=release_3_1_preview.5` is specified on the input-file: preview/v3.1-preview.5/TextAnalytics.json ``` +### Release 3.1 + +These settings apply only when `--tag=release_3_1` is specified on the command line. + +``` yaml $(tag) == 'release_3_0' +input-file: stable/v3.1/TextAnalytics.json +``` + ## Swagger to SDK This section describes what SDK should be generated by the automatic system. From fdf53d63f6da92579a6ef03ea6eb108f1905051d Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 24 May 2021 15:01:13 -0700 Subject: [PATCH 05/26] wip - update 3.1 --- .../stable/v3.1/TextAnalytics.json | 158 +++++++++--------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index cedbdad89dc1..7b4563b21d39 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1067,6 +1067,13 @@ }, "TaskState": { "properties": { + "lastUpdateDateTime": { + "format": "date-time", + "type": "string" + }, + "taskName": { + "type": "string" + }, "status": { "enum": [ "notStarted", @@ -1082,80 +1089,11 @@ "modelAsString": false, "name": "State" } - }, - "entityRecognitionTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/EntitiesTaskResult" - } - ] - } - }, - "entityRecognitionPiiTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/PiiTaskResult" - } - ] - } - }, - "keyPhraseExtractionTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/KeyPhraseTaskResult" - } - ] - } - }, - "entityLinkingTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/EntityLinkingTaskResult" - } - ] - } - }, - "sentimentAnalysisTasks": { - "type": "array", - "items": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "#/definitions/SentimentTaskResult" - } - ] - } } }, "required": [ - "status" + "status", + "lastUpdateDateTime" ], "type": "object" }, @@ -1163,14 +1101,6 @@ "properties": { "tasks": { "properties": { - "details": { - "allOf": [ - { - "$ref": "#/definitions/TaskState" - } - ], - "type": "object" - }, "completed": { "type": "integer" }, @@ -1182,6 +1112,76 @@ }, "total": { "type": "integer" + }, + "entityRecognitionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/EntitiesTaskResult" + } + ] + } + }, + "entityRecognitionPiiTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/PiiTaskResult" + } + ] + } + }, + "keyPhraseExtractionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/KeyPhraseTaskResult" + } + ] + } + }, + "entityLinkingTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/EntityLinkingTaskResult" + } + ] + } + }, + "sentimentAnalysisTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/SentimentTaskResult" + } + ] + } } }, "required": [ From 406eb5fab86c0f109bbe7740c4bc6ac1803bde84 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 24 May 2021 15:32:33 -0700 Subject: [PATCH 06/26] wip - update 3.1 --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 7b4563b21d39..cfd32116b3d3 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -29,7 +29,7 @@ { "$ref": "#/parameters/Endpoint" }, - { + { "$ref": "#/parameters/ApiVersion" } ] From 5cccf377d7657289efe39f6cb722755405e183ec Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 14:54:16 -0700 Subject: [PATCH 07/26] update piicategories as string --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index cfd32116b3d3..94e034468d2d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -2723,7 +2723,7 @@ "Default" ] }, - "type": "array", + "type": "string", "uniqueItems": true } }, @@ -2968,7 +2968,7 @@ }, "name": "piiCategories", "required": false, - "type": "array", + "type": "string", "uniqueItems": true, "x-ms-parameter-location": "method" }, From 56f6c4cc642010cdd839828fc5c568c6ab637ba7 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 14:58:34 -0700 Subject: [PATCH 08/26] update partiallyCompleted --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 94e034468d2d..076a0ed0e24d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1079,7 +1079,7 @@ "notStarted", "running", "succeeded", - "partiallySucceeded", + "partiallyCompleted", "failed", "rejected", "cancelled", From 281e03bb82f9c2ac09f96d45a74a8403dfc9c5ec Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 15:00:59 -0700 Subject: [PATCH 09/26] update analyzerequest --- .../stable/v3.1/examples/SuccessfulAnalyzeRequest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json index e1b8c498d32d..3aefd4bbb062 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json @@ -33,7 +33,7 @@ "responses": { "202": { "headers": { - "Operation-Location": "{endpoint}/text/analytics/v3.1-preview.5/analyze/jobs/{jobId}" + "Operation-Location": "{endpoint}/text/analytics/v3.1/analyze/jobs/{jobId}" } }, "400": { From e9a664f39f1f64d84730cee4f8252d16abac7417 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 15:17:13 -0700 Subject: [PATCH 10/26] update healthcare entity category --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 076a0ed0e24d..fa3a1d96e5fd 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1828,11 +1828,11 @@ }, "category": { "x-ms-enum": { - "name": "healthcareCategory", + "name": "category", "modelAsString": true }, "type": "string", - "description": "Entity Category.", + "description": "Healthcare Entity Category.", "enum": [ "BODY_STRUCTURE", "AGE", From 5fe7d64fd980eb803d40ab803a816d82de45ef2e Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 15:42:37 -0700 Subject: [PATCH 11/26] update partiallySucceeded --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index fa3a1d96e5fd..78e3fc297aee 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1079,7 +1079,7 @@ "notStarted", "running", "succeeded", - "partiallyCompleted", + "partiallySucceeded", "failed", "rejected", "cancelled", From 165bbe4b62437be467adb035729f8717e0bc35f1 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 15:57:35 -0700 Subject: [PATCH 12/26] remove partiallySucceeded --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 78e3fc297aee..884d1e65bb5a 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1079,7 +1079,6 @@ "notStarted", "running", "succeeded", - "partiallySucceeded", "failed", "rejected", "cancelled", From dfd664327e965ecafac2fb6d9a252dbb847e689b Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 17:06:19 -0700 Subject: [PATCH 13/26] remove partiallyCompleted --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 884d1e65bb5a..88fd876c5b52 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -2204,8 +2204,7 @@ "succeeded", "failed", "cancelled", - "cancelling", - "partiallyCompleted" + "cancelling" ], "type": "string", "x-ms-enum": { From f8cde50ac82636aac05a90496bf200e2f9fa000b Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 17:35:52 -0700 Subject: [PATCH 14/26] Update specification/cognitiveservices/data-plane/TextAnalytics/readme.md Co-authored-by: Mariana Rios Flores --- .../cognitiveservices/data-plane/TextAnalytics/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md index dfff6a1c03da..877f79d522e0 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md +++ b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md @@ -120,7 +120,7 @@ input-file: preview/v3.1-preview.5/TextAnalytics.json These settings apply only when `--tag=release_3_1` is specified on the command line. -``` yaml $(tag) == 'release_3_0' +``` yaml $(tag) == 'release_3_1' input-file: stable/v3.1/TextAnalytics.json ``` From 96cc09030670a324885989a63814c733df5e60cc Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 25 May 2021 17:39:49 -0700 Subject: [PATCH 15/26] address comments --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 88fd876c5b52..078663d8fd9e 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -900,7 +900,7 @@ "default": true, "type": "boolean" }, - "pii-categories": { + "piiCategories": { "$ref": "#/definitions/PiiCategories" }, "stringIndexType": { @@ -1827,7 +1827,7 @@ }, "category": { "x-ms-enum": { - "name": "category", + "name": "healthcareEntityCategory", "modelAsString": true }, "type": "string", From 2d89b729061a367f8d1af65d08c8a3804c8ba330 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Thu, 27 May 2021 08:23:39 -0700 Subject: [PATCH 16/26] Update TextAnalytics.json --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 078663d8fd9e..8a6675a84886 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -2721,7 +2721,7 @@ "Default" ] }, - "type": "string", + "type": "array", "uniqueItems": true } }, From dd64904b4a8594fed84f8fa409dd7008a1815afc Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Thu, 27 May 2021 08:45:26 -0700 Subject: [PATCH 17/26] add taskName to all input tasks --- .../TextAnalytics/stable/v3.1/TextAnalytics.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 8a6675a84886..36f973cbde92 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -908,6 +908,9 @@ } }, "type": "object" + }, + "taskName": { + "type": "string" } }, "type": "object" @@ -929,6 +932,9 @@ } }, "type": "object" + }, + "taskName": { + "type": "string" } }, "type": "object" @@ -954,6 +960,9 @@ } }, "type": "object" + }, + "taskName": { + "type": "string" } }, "type": "object" @@ -2330,6 +2339,9 @@ } }, "type": "object" + }, + "taskName": { + "type": "string" } }, "type": "object" @@ -2351,6 +2363,9 @@ } }, "type": "object" + }, + "taskName": { + "type": "string" } }, "type": "object" From 6a57b5ec408f3602f496745c21890165e0947fc1 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Thu, 27 May 2021 09:44:21 -0700 Subject: [PATCH 18/26] Update SuccessfulAnalyzeStatusRequest.json --- .../stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json index 93d23bfe90a3..78dd609982f0 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json @@ -21,7 +21,7 @@ "total": 2, "entityRecognitionTasks": [ { - "name": "Recognize Entities (2020-04-01)", + "taskName": "Recognize Entities (2020-04-01)", "lastUpdateDateTime": "2020-10-01T15:01:03Z", "status": "succeeded", "results": { From 83ce1df70d000493ee4217b9cfc7ebae3597a650 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Thu, 27 May 2021 11:36:11 -0700 Subject: [PATCH 19/26] update piicategories in query to be an array --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 36f973cbde92..66b6861620d4 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -2981,7 +2981,7 @@ }, "name": "piiCategories", "required": false, - "type": "string", + "type": "array", "uniqueItems": true, "x-ms-parameter-location": "method" }, From be5bc7f9d5def20a82bc79d5737b58a5453dc003 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 1 Jun 2021 16:31:14 -0700 Subject: [PATCH 20/26] run prettier --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 66b6861620d4..886cab010a73 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1838,7 +1838,7 @@ "x-ms-enum": { "name": "healthcareEntityCategory", "modelAsString": true - }, + }, "type": "string", "description": "Healthcare Entity Category.", "enum": [ @@ -1868,7 +1868,7 @@ "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME" - ] + ] }, "subcategory": { "type": "string", @@ -2741,7 +2741,7 @@ } }, "parameters": { - "ApiVersion": { + "ApiVersion": { "name": "ApiVersion", "description": "Text Analytics API version (for example, v3.0).", "x-ms-parameter-location": "client", From a5514a31e367567a0cf0dc62e23994be1b782a02 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 7 Jun 2021 12:18:07 -0700 Subject: [PATCH 21/26] resolve build errors --- .../TextAnalytics/stable/v3.1/TextAnalytics.json | 1 - .../stable/v3.1/examples/SuccessfulAnalyzeRequest.json | 1 + .../v3.1/examples/SuccessfulAnalyzeStatusRequest.json | 1 + .../stable/v3.1/examples/SuccessfulEntitiesRequest.json | 1 + .../v3.1/examples/SuccessfulEntityLinkingRequest.json | 1 + .../stable/v3.1/examples/SuccessfulEntityPIIRequest.json | 1 + .../v3.1/examples/SuccessfulHealthDeleteRequest.json | 1 + .../stable/v3.1/examples/SuccessfulHealthRequest.json | 1 + .../v3.1/examples/SuccessfulHealthStatusRequest.json | 7 ++++--- .../stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json | 1 + .../stable/v3.1/examples/SuccessfulLanguagesRequest.json | 1 + .../stable/v3.1/examples/SuccessfulSentimentRequest.json | 1 + 12 files changed, 14 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 886cab010a73..3a11fc837c54 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1821,7 +1821,6 @@ "type": "object", "allOf": [ { - "type": "object", "required": [ "text", "category", diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json index 3aefd4bbb062..61d3a02fedd7 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "jobId": "{Job ID}", "input": { diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json index 78dd609982f0..a765de3079d3 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "jobId": "{Job ID}" }, diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json index d6c9a0221153..5615d9aab4ea 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json index 998ac1d65bab..c9821ecb01da 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json index d125525bda91..4aac8eebf74f 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json index 569ae75df649..e01bbd132c94 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "jobId": "{Job ID}" }, diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json index 2fa1e9978902..6c854d1e032f 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "jobId": "{Job ID}", "input": { diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json index 1bb24e508072..5a11b912e22c 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "jobId": "{Job ID}" }, @@ -22,14 +23,14 @@ "offset": 18, "length": 5, "text": "100mg", - "category": "Dosage", + "category": "DOSAGE", "confidenceScore": 0.99 }, { "offset": 27, "length": 9, "text": "ibuprofen", - "category": "MedicationName", + "category": "MEDICATION_NAME", "confidenceScore": 1.0, "assertion": { "certainty": "positive" @@ -161,7 +162,7 @@ "offset": 37, "length": 11, "text": "twice daily", - "category": "Frequency", + "category": "FREQUENCY", "confidenceScore": 1 } ], diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json index f45b74e027f5..44aa2ab17461 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json index b1077b92db58..e150eb73c86d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json index c751289f2ac1..4b00aee9db39 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json @@ -1,6 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "{Api Version}", "Endpoint": "{Endpoint}", "input": { "documents": [ From 758feea19634db8a2df29fbfc971fdf252a18414 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 7 Jun 2021 13:25:18 -0700 Subject: [PATCH 22/26] fix lint errors --- .../stable/v3.1/examples/SuccessfulAnalyzeRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulEntitiesRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulEntityLinkingRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulEntityPIIRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulHealthDeleteRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulHealthRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulHealthStatusRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulLanguagesRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulSentimentRequest.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json index 61d3a02fedd7..5fb05ec93ecc 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "jobId": "{Job ID}", "input": { diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json index a765de3079d3..2cd92cbb95eb 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "jobId": "{Job ID}" }, diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json index 5615d9aab4ea..0345ee127e7e 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json index c9821ecb01da..3a607f0b271c 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json index 4aac8eebf74f..7a8c8e61a04f 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json index e01bbd132c94..6d54173daa17 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "jobId": "{Job ID}" }, diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json index 6c854d1e032f..eb4161fc663a 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "jobId": "{Job ID}", "input": { diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json index 5a11b912e22c..50d3cc5f94f5 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "jobId": "{Job ID}" }, diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json index 44aa2ab17461..b0658ea1dfbb 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json index e150eb73c86d..957db873fd6d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "input": { "documents": [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json index 4b00aee9db39..a92620304eb6 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json @@ -1,7 +1,7 @@ { "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "ApiVersion": "{Api Version}", + "ApiVersion": "v3.1", "Endpoint": "{Endpoint}", "input": { "documents": [ From 07525d49298137b256891b6af3e3d74517e45d62 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Mon, 7 Jun 2021 13:29:22 -0700 Subject: [PATCH 23/26] resolve build errors --- .../stable/v3.1/TextAnalytics.json | 140 +++++++++--------- 1 file changed, 72 insertions(+), 68 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 3a11fc837c54..1a97109bc2ff 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1821,74 +1821,7 @@ "type": "object", "allOf": [ { - "required": [ - "text", - "category", - "offset", - "length", - "confidenceScore" - ], - "properties": { - "text": { - "type": "string", - "description": "Entity text as appears in the request." - }, - "category": { - "x-ms-enum": { - "name": "healthcareEntityCategory", - "modelAsString": true - }, - "type": "string", - "description": "Healthcare Entity Category.", - "enum": [ - "BODY_STRUCTURE", - "AGE", - "GENDER", - "EXAMINATION_NAME", - "DATE", - "DIRECTION", - "FREQUENCY", - "MEASUREMENT_VALUE", - "MEASUREMENT_UNIT", - "RELATIONAL_OPERATOR", - "TIME", - "GENE_OR_PROTEIN", - "VARIANT", - "ADMINISTRATIVE_EVENT", - "CARE_ENVIRONMENT", - "HEALTHCARE_PROFESSION", - "DIAGNOSIS", - "SYMPTOM_OR_SIGN", - "CONDITION_QUALIFIER", - "MEDICATION_CLASS", - "MEDICATION_NAME", - "DOSAGE", - "MEDICATION_FORM", - "MEDICATION_ROUTE", - "FAMILY_RELATION", - "TREATMENT_NAME" - ] - }, - "subcategory": { - "type": "string", - "description": "(Optional) Entity sub type." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted entity." - } - } + "$ref": "#/definitions/HealthcareEntityProperties" }, { "$ref": "#/definitions/HealthcareLinkingProperties" @@ -2021,6 +1954,77 @@ } } }, + "HealthcareEntityProperties": { + "type": "object", + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ], + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "x-ms-enum": { + "name": "healthcareEntityCategory", + "modelAsString": true + }, + "type": "string", + "description": "Healthcare Entity Category.", + "enum": [ + "BODY_STRUCTURE", + "AGE", + "GENDER", + "EXAMINATION_NAME", + "DATE", + "DIRECTION", + "FREQUENCY", + "MEASUREMENT_VALUE", + "MEASUREMENT_UNIT", + "RELATIONAL_OPERATOR", + "TIME", + "GENE_OR_PROTEIN", + "VARIANT", + "ADMINISTRATIVE_EVENT", + "CARE_ENVIRONMENT", + "HEALTHCARE_PROFESSION", + "DIAGNOSIS", + "SYMPTOM_OR_SIGN", + "CONDITION_QUALIFIER", + "MEDICATION_CLASS", + "MEDICATION_NAME", + "DOSAGE", + "MEDICATION_FORM", + "MEDICATION_ROUTE", + "FAMILY_RELATION", + "TREATMENT_NAME" + ] + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + } + } + }, "HealthcareLinkingProperties": { "properties": { "assertion": { From 514887fc402b024d2aacb2b4a34161754ce96341 Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 8 Jun 2021 08:37:00 -0700 Subject: [PATCH 24/26] resolve build errors --- .../stable/v3.1/TextAnalytics.json | 156 ++++-------------- 1 file changed, 34 insertions(+), 122 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index 1a97109bc2ff..ff227a0c74d5 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -67,19 +67,11 @@ } } }, - "400": { - "description": "Bad Request.", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -132,19 +124,11 @@ "$ref": "#/definitions/AnalyzeJobState" } }, - "404": { - "description": "Job ID not found.", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -196,19 +180,11 @@ "$ref": "#/definitions/HealthcareJobState" } }, - "404": { - "description": "Job ID not found.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -240,19 +216,11 @@ } } }, - "404": { - "description": "Job ID not found.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -300,19 +268,11 @@ } } }, - "400": { - "description": "Bad Request.", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -361,19 +321,11 @@ "$ref": "#/definitions/EntitiesResult" } }, - "400": { - "description": "Bad Request.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -430,19 +382,11 @@ "$ref": "#/definitions/PiiResult" } }, - "400": { - "description": "Bad Request.", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -490,19 +434,11 @@ "$ref": "#/definitions/EntityLinkingResult" } }, - "400": { - "description": "Bad Request.", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -547,19 +483,11 @@ "$ref": "#/definitions/KeyPhraseResult" } }, - "400": { - "description": "Bad Request.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -604,19 +532,11 @@ "$ref": "#/definitions/LanguageResult" } }, - "400": { - "description": "Bad Request.", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -670,19 +590,11 @@ "$ref": "#/definitions/SentimentResponse" } }, - "400": { - "description": "Bad Request.", + "default": { + "description": "Unexpected error", "schema": { "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true - }, - "500": { - "description": "Internal error response", - "schema": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-error-response": true + } } }, "x-ms-examples": { @@ -826,7 +738,7 @@ ], "x-ms-enum": { "name": "ErrorCodeValue", - "modelAsString": false + "modelAsString": true }, "description": "Error code." }, From 338706df8cf7da91485db9e3a76e04748999555a Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 8 Jun 2021 09:08:29 -0700 Subject: [PATCH 25/26] remove errors from response examples --- .../examples/SuccessfulAnalyzeRequest.json | 22 ------------------- .../SuccessfulAnalyzeStatusRequest.json | 22 ------------------- .../examples/SuccessfulEntitiesRequest.json | 22 ------------------- .../SuccessfulEntityLinkingRequest.json | 22 ------------------- .../examples/SuccessfulEntityPIIRequest.json | 22 ------------------- .../SuccessfulHealthDeleteRequest.json | 22 ------------------- .../examples/SuccessfulHealthRequest.json | 22 ------------------- .../SuccessfulHealthStatusRequest.json | 22 ------------------- .../examples/SuccessfulKeyPhrasesRequest.json | 22 ------------------- .../examples/SuccessfulLanguagesRequest.json | 22 ------------------- .../examples/SuccessfulSentimentRequest.json | 22 ------------------- 11 files changed, 242 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json index 5fb05ec93ecc..f80468967cea 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeRequest.json @@ -36,28 +36,6 @@ "headers": { "Operation-Location": "{endpoint}/text/analytics/v3.1/analyze/jobs/{jobId}" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "InvalidRequest", - "message": "Invalid Request.", - "innererror": { - "code": "MissingInputRecords", - "message": "Missing input records." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json index 2cd92cbb95eb..d4ee37b40eab 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulAnalyzeStatusRequest.json @@ -86,28 +86,6 @@ ] } } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "NotFound", - "message": "Not Found", - "innererror": { - "code": "JobIdNotFound", - "message": "Job ID not found." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json index 0345ee127e7e..5c72248e9ba2 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntitiesRequest.json @@ -68,28 +68,6 @@ "errors": [], "modelVersion": "2020-04-01" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "InvalidRequest", - "message": "Invalid Request.", - "innererror": { - "code": "MissingInputRecords", - "message": "Missing input records." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json index 3a607f0b271c..3c5b9357e0cc 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityLinkingRequest.json @@ -114,28 +114,6 @@ "errors": [], "modelVersion": "2020-02-01" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "InvalidRequest", - "message": "Invalid Request.", - "innererror": { - "code": "MissingInputRecords", - "message": "Missing input records." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json index 7a8c8e61a04f..8f64ad94acec 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulEntityPIIRequest.json @@ -74,28 +74,6 @@ "errors": [], "modelVersion": "2019-10-01" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "InvalidRequest", - "message": "Invalid Request.", - "innererror": { - "code": "MissingInputRecords", - "message": "Missing input records." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json index 6d54173daa17..fb279515ff70 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json @@ -10,28 +10,6 @@ "headers": { "Operation-Location": "{endpoint}/text/analytics/v3.1-preview.5/entities/healthcare/jobs/{jobId}" } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "NotFound", - "message": "Not Found", - "innererror": { - "code": "JobIdNotFound", - "message": "Job ID not found." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json index eb4161fc663a..27e5ef6a1d1a 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json @@ -19,28 +19,6 @@ "headers": { "Operation-Location": "{endpoint}/text/analytics/v3.1-preview.5/entities/healthcare/jobs/{jobId}" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "InvalidRequest", - "message": "Invalid Request.", - "innererror": { - "code": "MissingInputRecords", - "message": "Missing input records." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json index 50d3cc5f94f5..0c0fd5102404 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthStatusRequest.json @@ -201,28 +201,6 @@ "modelVersion": "2020-05-08" } } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "NotFound", - "message": "Not Found", - "innererror": { - "code": "JobIdNotFound", - "message": "Job ID not found." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json index b0658ea1dfbb..544df54ecd4d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulKeyPhrasesRequest.json @@ -57,28 +57,6 @@ "errors": [], "modelVersion": "2019-10-01" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "InvalidRequest", - "message": "Invalid Request.", - "innererror": { - "code": "MissingInputRecords", - "message": "Missing input records." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json index 957db873fd6d..e5c9d454ee49 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulLanguagesRequest.json @@ -56,28 +56,6 @@ "errors": [], "modelVersion": "2020-04-01" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "InvalidRequest", - "message": "Invalid Request.", - "innererror": { - "code": "MissingInputRecords", - "message": "Missing input records." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json index a92620304eb6..8170ba0275c8 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulSentimentRequest.json @@ -134,28 +134,6 @@ "errors": [], "modelVersion": "2020-04-01" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "InvalidRequest", - "message": "Invalid Request.", - "innererror": { - "code": "MissingInputRecords", - "message": "Missing input records." - } - } - } - }, - "500": { - "headers": {}, - "body": { - "error": { - "code": "InternalServerError", - "message": "Internal Server Error" - } - } } } } From a8ee67ca0997112125fd2869131e5936e95376db Mon Sep 17 00:00:00 2001 From: Suhas Mehta Date: Tue, 8 Jun 2021 10:38:13 -0700 Subject: [PATCH 26/26] resolve comments --- .../data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json | 3 ++- .../stable/v3.1/examples/SuccessfulHealthDeleteRequest.json | 2 +- .../stable/v3.1/examples/SuccessfulHealthRequest.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json index ff227a0c74d5..39d988388122 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json @@ -1013,7 +1013,8 @@ }, "required": [ "status", - "lastUpdateDateTime" + "lastUpdateDateTime", + "taskName" ], "type": "object" }, diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json index fb279515ff70..071c295ccd22 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthDeleteRequest.json @@ -8,7 +8,7 @@ "responses": { "202": { "headers": { - "Operation-Location": "{endpoint}/text/analytics/v3.1-preview.5/entities/healthcare/jobs/{jobId}" + "Operation-Location": "{endpoint}/text/analytics/v3.1/entities/healthcare/jobs/{jobId}" } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json index 27e5ef6a1d1a..3791aecb42a4 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/examples/SuccessfulHealthRequest.json @@ -17,7 +17,7 @@ "responses": { "202": { "headers": { - "Operation-Location": "{endpoint}/text/analytics/v3.1-preview.5/entities/healthcare/jobs/{jobId}" + "Operation-Location": "{endpoint}/text/analytics/v3.1/entities/healthcare/jobs/{jobId}" } } }