|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "title": "Microsoft Cognitive Language Service", |
| 5 | + "description": "The language service API is a suite of natural language processing (NLP) skills 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, language detection and question answering. Further documentation can be found in <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\">https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview</a>.", |
| 6 | + "version": "2021-10-01" |
| 7 | + }, |
| 8 | + "paths": {}, |
| 9 | + "definitions": { |
| 10 | + "ErrorResponse": { |
| 11 | + "type": "object", |
| 12 | + "description": "Error response.", |
| 13 | + "additionalProperties": false, |
| 14 | + "properties": { |
| 15 | + "error": { |
| 16 | + "description": "The error object.", |
| 17 | + "$ref": "#/definitions/Error" |
| 18 | + } |
| 19 | + } |
| 20 | + }, |
| 21 | + "Error": { |
| 22 | + "type": "object", |
| 23 | + "description": "The error object.", |
| 24 | + "additionalProperties": false, |
| 25 | + "required": [ |
| 26 | + "code", |
| 27 | + "message" |
| 28 | + ], |
| 29 | + "properties": { |
| 30 | + "code": { |
| 31 | + "description": "One of a server-defined set of error codes.", |
| 32 | + "$ref": "#/definitions/ErrorCode" |
| 33 | + }, |
| 34 | + "message": { |
| 35 | + "type": "string", |
| 36 | + "description": "A human-readable representation of the error." |
| 37 | + }, |
| 38 | + "target": { |
| 39 | + "type": "string", |
| 40 | + "description": "The target of the error." |
| 41 | + }, |
| 42 | + "details": { |
| 43 | + "type": "array", |
| 44 | + "description": "An array of details about specific errors that led to this reported error.", |
| 45 | + "items": { |
| 46 | + "$ref": "#/definitions/Error" |
| 47 | + } |
| 48 | + }, |
| 49 | + "innererror": { |
| 50 | + "description": "An object containing more specific information than the current object about the error.", |
| 51 | + "$ref": "#/definitions/InnerErrorModel" |
| 52 | + } |
| 53 | + } |
| 54 | + }, |
| 55 | + "InnerErrorModel": { |
| 56 | + "type": "object", |
| 57 | + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", |
| 58 | + "additionalProperties": false, |
| 59 | + "required": [ |
| 60 | + "code", |
| 61 | + "message" |
| 62 | + ], |
| 63 | + "properties": { |
| 64 | + "code": { |
| 65 | + "description": "One of a server-defined set of error codes.", |
| 66 | + "$ref": "#/definitions/InnerErrorCode" |
| 67 | + }, |
| 68 | + "message": { |
| 69 | + "type": "string", |
| 70 | + "description": "Error message." |
| 71 | + }, |
| 72 | + "details": { |
| 73 | + "type": "object", |
| 74 | + "additionalProperties": { |
| 75 | + "type": "string" |
| 76 | + }, |
| 77 | + "description": "Error details." |
| 78 | + }, |
| 79 | + "target": { |
| 80 | + "type": "string", |
| 81 | + "description": "Error target." |
| 82 | + }, |
| 83 | + "innererror": { |
| 84 | + "description": "An object containing more specific information than the current object about the error.", |
| 85 | + "$ref": "#/definitions/InnerErrorModel" |
| 86 | + } |
| 87 | + } |
| 88 | + }, |
| 89 | + "ErrorCode": { |
| 90 | + "type": "string", |
| 91 | + "description": "Human-readable error code.", |
| 92 | + "x-ms-enum": { |
| 93 | + "name": "ErrorCode", |
| 94 | + "modelAsString": true |
| 95 | + }, |
| 96 | + "enum": [ |
| 97 | + "InvalidRequest", |
| 98 | + "InvalidArgument", |
| 99 | + "Unauthorized", |
| 100 | + "Forbidden", |
| 101 | + "NotFound", |
| 102 | + "ProjectNotFound", |
| 103 | + "OperationNotFound", |
| 104 | + "AzureCognitiveSearchNotFound", |
| 105 | + "AzureCognitiveSearchIndexNotFound", |
| 106 | + "TooManyRequests", |
| 107 | + "AzureCognitiveSearchThrottling", |
| 108 | + "AzureCognitiveSearchIndexLimitReached", |
| 109 | + "InternalServerError", |
| 110 | + "ServiceUnavailable" |
| 111 | + ] |
| 112 | + }, |
| 113 | + "InnerErrorCode": { |
| 114 | + "type": "string", |
| 115 | + "description": "Human-readable error code.", |
| 116 | + "x-ms-enum": { |
| 117 | + "name": "InnerErrorCode", |
| 118 | + "modelAsString": true |
| 119 | + }, |
| 120 | + "enum": [ |
| 121 | + "InvalidRequest", |
| 122 | + "InvalidParameterValue", |
| 123 | + "KnowledgeBaseNotFound", |
| 124 | + "AzureCognitiveSearchNotFound", |
| 125 | + "AzureCognitiveSearchThrottling", |
| 126 | + "ExtractionFailure" |
| 127 | + ] |
| 128 | + }, |
| 129 | + "Language": { |
| 130 | + "type": "string", |
| 131 | + "description": "Language of the text records. This is BCP-47 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default." |
| 132 | + }, |
| 133 | + "StringIndexType": { |
| 134 | + "type": "string", |
| 135 | + "description": "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.", |
| 136 | + "default": "TextElements_v8", |
| 137 | + "enum": [ |
| 138 | + "TextElements_v8", |
| 139 | + "UnicodeCodePoint", |
| 140 | + "Utf16CodeUnit" |
| 141 | + ], |
| 142 | + "x-ms-enum": { |
| 143 | + "name": "StringIndexType", |
| 144 | + "modelAsString": true, |
| 145 | + "values": [ |
| 146 | + { |
| 147 | + "value": "TextElements_v8", |
| 148 | + "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." |
| 149 | + }, |
| 150 | + { |
| 151 | + "value": "UnicodeCodePoint", |
| 152 | + "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." |
| 153 | + }, |
| 154 | + { |
| 155 | + "value": "Utf16CodeUnit", |
| 156 | + "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." |
| 157 | + } |
| 158 | + ] |
| 159 | + } |
| 160 | + } |
| 161 | + }, |
| 162 | + "parameters": { |
| 163 | + "Endpoint": { |
| 164 | + "name": "Endpoint", |
| 165 | + "description": "Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com).", |
| 166 | + "x-ms-parameter-location": "client", |
| 167 | + "required": true, |
| 168 | + "type": "string", |
| 169 | + "in": "path", |
| 170 | + "x-ms-skip-url-encoding": true |
| 171 | + }, |
| 172 | + "ProjectNameQueryParameter": { |
| 173 | + "name": "projectName", |
| 174 | + "in": "query", |
| 175 | + "required": true, |
| 176 | + "type": "string", |
| 177 | + "description": "The name of the project to use.", |
| 178 | + "x-ms-parameter-location": "method" |
| 179 | + }, |
| 180 | + "ProjectNamePathParameter": { |
| 181 | + "name": "projectName", |
| 182 | + "in": "path", |
| 183 | + "required": true, |
| 184 | + "type": "string", |
| 185 | + "maxLength": 100, |
| 186 | + "description": "The name of the project to use.", |
| 187 | + "x-ms-parameter-location": "method" |
| 188 | + }, |
| 189 | + "DeploymentNameQueryParameter": { |
| 190 | + "name": "deploymentName", |
| 191 | + "in": "query", |
| 192 | + "required": true, |
| 193 | + "type": "string", |
| 194 | + "description": "The name of the specific deployment of the project to use.", |
| 195 | + "x-ms-parameter-location": "method" |
| 196 | + }, |
| 197 | + "DeploymentNamePathParameter": { |
| 198 | + "name": "deploymentName", |
| 199 | + "in": "path", |
| 200 | + "required": true, |
| 201 | + "type": "string", |
| 202 | + "description": "The name of the specific deployment of the project to use.", |
| 203 | + "x-ms-parameter-location": "method" |
| 204 | + }, |
| 205 | + "ApiVersionParameter": { |
| 206 | + "name": "api-version", |
| 207 | + "in": "query", |
| 208 | + "required": true, |
| 209 | + "type": "string", |
| 210 | + "description": "Client API version." |
| 211 | + }, |
| 212 | + "TopParameter": { |
| 213 | + "name": "top", |
| 214 | + "in": "query", |
| 215 | + "description": "The maximum number of resources to return from the collection.", |
| 216 | + "type": "integer", |
| 217 | + "format": "int32", |
| 218 | + "x-ms-parameter-location": "method" |
| 219 | + }, |
| 220 | + "SkipParameter": { |
| 221 | + "name": "skip", |
| 222 | + "in": "query", |
| 223 | + "description": "An offset into the collection of the first resource to be returned.", |
| 224 | + "type": "integer", |
| 225 | + "format": "int32", |
| 226 | + "x-ms-parameter-location": "method" |
| 227 | + }, |
| 228 | + "MaxPageSizeParameter": { |
| 229 | + "name": "maxpagesize", |
| 230 | + "in": "query", |
| 231 | + "description": "The maximum number of resources to include in a single response.", |
| 232 | + "type": "integer", |
| 233 | + "format": "int32", |
| 234 | + "x-ms-parameter-location": "method" |
| 235 | + } |
| 236 | + } |
| 237 | +} |
0 commit comments