github.com/kaisawind/go-swagger@v0.19.0/fixtures/canary/ms-cog-sci/swagger.json (about)

     1  {
     2    "swagger": "2.0",
     3    "info": {
     4      "title": "Azure Machine Learning - Text Analytics",
     5      "version": "1.0",
     6      "description": "The Text Analytics API is a suite of text analytics web services built with Azure Machine Learning. \r\nThe API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. \r\nNo training data is needed to use this API; just bring your text data. \r\nThis API uses advanced natural language processing techniques to deliver best in class predictions.\r\n\r\nFurther documentation can be found in https://azure.microsoft.com/en-us/documentation/articles/machine-learning-apps-text-analytics/"
     7    },
     8    "host": "westus.api.cognitive.microsoft.com",
     9    "basePath": "/text/analytics/v2.0",
    10    "schemes": [
    11      "https"
    12    ],
    13    "paths": {
    14      "/keyPhrases": {
    15        "post": {
    16          "description": "The API returns a list of strings denoting the key talking points in the input text. \r\n            We employ techniques from Microsoft Office's sophisticated Natural Language Processing toolkit. \r\n            Currently, the following languages are supported: English, German, Spanish and Japanese.",
    17          "operationId": "Key Phrases",
    18          "parameters": [
    19            {
    20              "name": "subscription-key",
    21              "in": "query",
    22              "description": "subscription key in url",
    23              "type": "string"
    24            },
    25            {
    26              "name": "Ocp-Apim-Subscription-Key",
    27              "in": "header",
    28              "description": "subscription key in header",
    29              "type": "string"
    30            },
    31            {
    32              "name": "multiLanguageBatchInputV2",
    33              "in": "body",
    34              "schema": {
    35                "$ref": "#/definitions/MultiLanguageBatchInputV2"
    36              }
    37            }
    38          ],
    39          "consumes": [
    40            "application/json",
    41            "text/json"
    42          ],
    43          "responses": {
    44            "200": {
    45              "description": "OK",
    46              "schema": {
    47                "$ref": "#/definitions/KeyPhraseBatchResultV2"
    48              }
    49            },
    50            "400": {
    51              "description": "BadRequest",
    52              "schema": {
    53                "$ref": "#/definitions/ErrorResponse"
    54              }
    55            }
    56          },
    57          "produces": [
    58            "application/json",
    59            "text/json"
    60          ]
    61        }
    62      },
    63      "/languages": {
    64        "post": {
    65          "description": "The API returns the detected language and a numeric score between 0 and 1. \r\n            Scores close to 1 indicate 100% certainty that the identified language is true. \r\n            A total of 120 languages are supported.",
    66          "operationId": "Detect Language",
    67          "parameters": [
    68            {
    69              "name": "numberOfLanguagesToDetect",
    70              "in": "query",
    71              "description": "Format - int32. (Optional) Number of languages to detect. Set to 1 by default.",
    72              "type": "integer"
    73            },
    74            {
    75              "name": "subscription-key",
    76              "in": "query",
    77              "description": "subscription key in url",
    78              "type": "string"
    79            },
    80            {
    81              "name": "Ocp-Apim-Subscription-Key",
    82              "in": "header",
    83              "description": "subscription key in header",
    84              "type": "string"
    85            },
    86            {
    87              "name": "batchInputV2",
    88              "in": "body",
    89              "schema": {
    90                "$ref": "#/definitions/BatchInputV2"
    91              }
    92            }
    93          ],
    94          "consumes": [
    95            "application/json",
    96            "text/json"
    97          ],
    98          "responses": {
    99            "200": {
   100              "description": "OK",
   101              "schema": {
   102                "$ref": "#/definitions/LanguageBatchResultV2"
   103              }
   104            },
   105            "400": {
   106              "description": "BadRequest",
   107              "schema": {
   108                "$ref": "#/definitions/ErrorResponse"
   109              }
   110            }
   111          },
   112          "produces": [
   113            "application/json",
   114            "text/json"
   115          ]
   116        }
   117      },
   118      "/operations/{operationId}": {
   119        "get": {
   120          "description": "Get the status of an operation submitted for processing. If the the operation has reached a 'Succeeded' state, will also return the result.",
   121          "operationId": "Operation Status",
   122          "parameters": [
   123            {
   124              "name": "operationId",
   125              "in": "path",
   126              "description": "A unique id for the submitted operation.",
   127              "required": true,
   128              "type": "string"
   129            },
   130            {
   131              "name": "subscription-key",
   132              "in": "query",
   133              "description": "subscription key in url",
   134              "type": "string"
   135            },
   136            {
   137              "name": "Ocp-Apim-Subscription-Key",
   138              "in": "header",
   139              "description": "subscription key in header",
   140              "type": "string"
   141            }
   142          ],
   143          "responses": {
   144            "200": {
   145              "description": "OK",
   146              "schema": {
   147                "$ref": "#/definitions/OperationResult"
   148              }
   149            },
   150            "400": {
   151              "description": "BadRequest",
   152              "schema": {
   153                "$ref": "#/definitions/ErrorResponse"
   154              }
   155            }
   156          },
   157          "produces": [
   158            "application/json",
   159            "text/json"
   160          ]
   161        }
   162      },
   163      "/sentiment": {
   164        "post": {
   165          "description": "The API returns a numeric score between 0 and 1. \r\n            Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment. \r\n            Sentiment score is generated using classification techniques. \r\n            The input features to the classifier include n-grams, features generated from part-of-speech tags, and word embeddings. \r\n            Currently, the following languages are supported: English, Spanish, French, Portuguese.",
   166          "operationId": "Sentiment",
   167          "parameters": [
   168            {
   169              "name": "subscription-key",
   170              "in": "query",
   171              "description": "subscription key in url",
   172              "type": "string"
   173            },
   174            {
   175              "name": "Ocp-Apim-Subscription-Key",
   176              "in": "header",
   177              "description": "subscription key in header",
   178              "type": "string"
   179            },
   180            {
   181              "name": "multiLanguageBatchInputV2",
   182              "in": "body",
   183              "schema": {
   184                "$ref": "#/definitions/MultiLanguageBatchInputV2"
   185              }
   186            }
   187          ],
   188          "consumes": [
   189            "application/json",
   190            "text/json"
   191          ],
   192          "responses": {
   193            "200": {
   194              "description": "OK",
   195              "schema": {
   196                "$ref": "#/definitions/SentimentBatchResultV2"
   197              }
   198            },
   199            "400": {
   200              "description": "BadRequest",
   201              "schema": {
   202                "$ref": "#/definitions/ErrorResponse"
   203              }
   204            }
   205          },
   206          "produces": [
   207            "application/json",
   208            "text/json"
   209          ]
   210        }
   211      },
   212      "/topics": {
   213        "post": {
   214          "description": "The API returns the top detected topics for a list of submitted text documents. \r\n            A topic is identified with a key phrase, which can be one or more related words. \r\n            Use the URL parameters and stop word list to control which words or documents are filtered out. \r\n            You can also supply a list of topics to exclude from the response. \r\n            At least 100 text documents must be submitted, however it is designed to detect topics across hundreds to thousands of documents. \r\n            Note that one transaction is charged per text document submitted. \r\n            For best performance, limit each document to a short, human written text paragraph such as review, conversation or user feedback.",
   215          "operationId": "Detect Topics",
   216          "parameters": [
   217            {
   218              "name": "minDocumentsPerWord",
   219              "in": "query",
   220              "description": "Format - int32. (optional) Words that occur in less than this many documents are ignored. \r\n            Use this parameter to help exclude rare document topics.\r\n            Omit to let the service choose appropriate value.",
   221              "type": "integer"
   222            },
   223            {
   224              "name": "maxDocumentsPerWord",
   225              "in": "query",
   226              "description": "Format - int32. (optional) Words that occur in more than this many documents are ignored. \r\n            Use this parameter to help exclude ubiquitous document topics.\r\n            Omit to let the service choose appropriate value.",
   227              "type": "integer"
   228            },
   229            {
   230              "name": "subscription-key",
   231              "in": "query",
   232              "description": "subscription key in url",
   233              "type": "string"
   234            },
   235            {
   236              "name": "Ocp-Apim-Subscription-Key",
   237              "in": "header",
   238              "description": "subscription key in header",
   239              "type": "string"
   240            },
   241            {
   242              "name": "topicDetectionInputV2",
   243              "in": "body",
   244              "schema": {
   245                "$ref": "#/definitions/TopicDetectionInputV2"
   246              }
   247            }
   248          ],
   249          "consumes": [
   250            "application/json",
   251            "text/json"
   252          ],
   253          "responses": {
   254            "202": {
   255              "description": "Accepted",
   256              "headers": {
   257                "Operation-Location": {
   258                  "type": "string",
   259                  "description": "URL of the created operation. Invoke a GET HTTP request to retrieve the operation status."
   260                }
   261              }
   262            },
   263            "400": {
   264              "description": "BadRequest",
   265              "schema": {
   266                "$ref": "#/definitions/ErrorResponse"
   267              }
   268            }
   269          },
   270          "produces": [
   271            "application/json",
   272            "text/json"
   273          ]
   274        }
   275      }
   276    },
   277    "definitions": {
   278      "MultiLanguageBatchInputV2": {
   279        "type": "object",
   280        "properties": {
   281          "documents": {
   282            "type": "array",
   283            "items": {
   284              "$ref": "#/definitions/MultiLanguageInputV2"
   285            }
   286          }
   287        }
   288      },
   289      "MultiLanguageInputV2": {
   290        "type": "object",
   291        "properties": {
   292          "language": {
   293            "description": "This is the 2 letter ISO 639-1 representation of a language.\r\n            For example, use \"en\" for English; \"es\" for Spanish etc.,",
   294            "type": "string"
   295          },
   296          "id": {
   297            "description": "Unique, non-empty document identifier.",
   298            "type": "string"
   299          },
   300          "text": {
   301            "type": "string"
   302          }
   303        }
   304      },
   305      "KeyPhraseBatchResultV2": {
   306        "type": "object",
   307        "properties": {
   308          "documents": {
   309            "type": "array",
   310            "items": {
   311              "$ref": "#/definitions/KeyPhraseBatchResultItemV2"
   312            }
   313          },
   314          "errors": {
   315            "type": "array",
   316            "items": {
   317              "$ref": "#/definitions/ErrorRecordV2"
   318            }
   319          }
   320        }
   321      },
   322      "KeyPhraseBatchResultItemV2": {
   323        "type": "object",
   324        "properties": {
   325          "keyPhrases": {
   326            "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.",
   327            "type": "array",
   328            "items": {
   329              "type": "string"
   330            }
   331          },
   332          "id": {
   333            "description": "Unique document identifier.",
   334            "type": "string"
   335          }
   336        }
   337      },
   338      "ErrorRecordV2": {
   339        "type": "object",
   340        "properties": {
   341          "id": {
   342            "description": "Input document unique identifier the error refers to.",
   343            "type": "string"
   344          },
   345          "message": {
   346            "description": "Error message.",
   347            "type": "string"
   348          }
   349        }
   350      },
   351      "ErrorResponse": {
   352        "type": "object",
   353        "properties": {
   354          "code": {
   355            "type": "string"
   356          },
   357          "message": {
   358            "type": "string"
   359          },
   360          "target": {
   361            "type": "string"
   362          },
   363          "innerError": {
   364            "$ref": "#/definitions/InternalError"
   365          }
   366        }
   367      },
   368      "InternalError": {
   369        "type": "object",
   370        "properties": {
   371          "code": {
   372            "enum": [
   373              "invalidParameterValue",
   374              "invalidRequestBodyFormat",
   375              "missingRequiredHeader",
   376              "invalidRequestContent",
   377              "missingRequiredParameter"
   378            ],
   379            "type": "string"
   380          },
   381          "message": {
   382            "type": "string"
   383          },
   384          "innerError": {
   385            "$ref": "#/definitions/InternalError"
   386          }
   387        }
   388      },
   389      "BatchInputV2": {
   390        "type": "object",
   391        "properties": {
   392          "documents": {
   393            "type": "array",
   394            "items": {
   395              "$ref": "#/definitions/InputV2"
   396            }
   397          }
   398        }
   399      },
   400      "InputV2": {
   401        "type": "object",
   402        "properties": {
   403          "id": {
   404            "description": "Unique, non-empty document identifier.",
   405            "type": "string"
   406          },
   407          "text": {
   408            "type": "string"
   409          }
   410        }
   411      },
   412      "Object": {
   413        "type": "object",
   414        "properties": {}
   415      },
   416      "LanguageBatchResultV2": {
   417        "type": "object",
   418        "properties": {
   419          "documents": {
   420            "type": "array",
   421            "items": {
   422              "$ref": "#/definitions/LanguageBatchResultItemV2"
   423            }
   424          },
   425          "errors": {
   426            "type": "array",
   427            "items": {
   428              "$ref": "#/definitions/ErrorRecordV2"
   429            }
   430          }
   431        }
   432      },
   433      "LanguageBatchResultItemV2": {
   434        "type": "object",
   435        "properties": {
   436          "id": {
   437            "description": "Unique document identifier.",
   438            "type": "string"
   439          },
   440          "detectedLanguages": {
   441            "description": "A list of extracted languages.",
   442            "type": "array",
   443            "items": {
   444              "$ref": "#/definitions/DetectedLanguageV2"
   445            }
   446          }
   447        }
   448      },
   449      "DetectedLanguageV2": {
   450        "type": "object",
   451        "properties": {
   452          "name": {
   453            "description": "Long name of a detected language (e.g. English, French).",
   454            "type": "string"
   455          },
   456          "iso6391Name": {
   457            "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr).",
   458            "type": "string"
   459          },
   460          "score": {
   461            "format": "double",
   462            "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true.",
   463            "type": "number"
   464          }
   465        }
   466      },
   467      "OperationResult": {
   468        "type": "object",
   469        "properties": {
   470          "status": {
   471            "description": "Operation status.",
   472            "enum": [
   473              "notStarted",
   474              "running",
   475              "failed",
   476              "cancelled",
   477              "succeeded"
   478            ],
   479            "type": "string"
   480          },
   481          "createdDateTime": {
   482            "format": "date-time",
   483            "description": "Operation creation date time (ISO 8601 literal).",
   484            "type": "string"
   485          },
   486          "lastActionDateTime": {
   487            "format": "date-time",
   488            "description": "Operation last status change date time (ISO 8601 literal).",
   489            "type": "string"
   490          },
   491          "operationType": {
   492            "description": "Name of API endpoint that created the operation.",
   493            "type": "string"
   494          },
   495          "operationProcessingResult": {
   496            "$ref": "#/definitions/OperationProcessingResult",
   497            "description": "Operation result. Specific format varies according to the operation type. Exists only in case the operation has reached a 'Succeeded' state."
   498          },
   499          "message": {
   500            "description": "Error message. Exists only in case the operation has reached a 'Failed' state.",
   501            "type": "string"
   502          }
   503        }
   504      },
   505      "OperationProcessingResult": {
   506        "required": [
   507          "discriminator"
   508        ],
   509        "type": "object",
   510        "properties": {
   511          "errors": {
   512            "type": "array",
   513            "items": {
   514              "$ref": "#/definitions/ErrorRecordV2"
   515            }
   516          },
   517          "discriminator": {
   518            "type": "string"
   519          }
   520        },
   521        "discriminator": "discriminator"
   522      },
   523      "SentimentBatchResultV2": {
   524        "type": "object",
   525        "properties": {
   526          "documents": {
   527            "type": "array",
   528            "items": {
   529              "$ref": "#/definitions/SentimentBatchResultItemV2"
   530            }
   531          },
   532          "errors": {
   533            "type": "array",
   534            "items": {
   535              "$ref": "#/definitions/ErrorRecordV2"
   536            }
   537          }
   538        }
   539      },
   540      "SentimentBatchResultItemV2": {
   541        "type": "object",
   542        "properties": {
   543          "score": {
   544            "format": "double",
   545            "description": "A decimal number between 0 and 1 denoting the sentiment of the document. \r\n            A score above 0.7 usually refers to a positive document while a score below 0.3 normally has a negative connotation.\r\n            Mid values refer to neutral text.",
   546            "type": "number"
   547          },
   548          "id": {
   549            "description": "Unique document identifier.",
   550            "type": "string"
   551          }
   552        }
   553      },
   554      "TopicDetectionInputV2": {
   555        "type": "object",
   556        "properties": {
   557          "stopWords": {
   558            "description": "List of words to ignore from all documents during pre-processing.",
   559            "type": "array",
   560            "items": {
   561              "type": "string"
   562            }
   563          },
   564          "topicsToExclude": {
   565            "description": "List of topics to omit from the response.",
   566            "type": "array",
   567            "items": {
   568              "type": "string"
   569            }
   570          },
   571          "documents": {
   572            "type": "array",
   573            "items": {
   574              "$ref": "#/definitions/InputV2"
   575            }
   576          }
   577        }
   578      },
   579      "TopicDetectionResultV2": {
   580        "description": "This is object returned for the clustering call",
   581        "type": "object",
   582        "allOf": [
   583          {
   584            "$ref": "#/definitions/OperationProcessingResult"
   585          },
   586          {
   587            "type": "object",
   588            "properties": {
   589              "topics": {
   590                "type": "array",
   591                "items": {
   592                  "$ref": "#/definitions/TopicInfoRecordV2"
   593                }
   594              },
   595              "topicAssignments": {
   596                "type": "array",
   597                "items": {
   598                  "$ref": "#/definitions/TopicAssignmentRecordV2"
   599                }
   600              },
   601              "errors": {
   602                "type": "array",
   603                "items": {
   604                  "$ref": "#/definitions/ErrorRecordV2"
   605                }
   606              }
   607            }
   608          }
   609        ],
   610        "properties": {}
   611      },
   612      "TopicInfoRecordV2": {
   613        "type": "object",
   614        "properties": {
   615          "id": {
   616            "description": "A unique identifier for each topic.",
   617            "type": "string"
   618          },
   619          "score": {
   620            "format": "double",
   621            "description": "Count of documents assigned to topic.",
   622            "type": "number"
   623          },
   624          "keyPhrase": {
   625            "description": "A summarizing word or phrase for the topic.",
   626            "type": "string"
   627          }
   628        }
   629      },
   630      "TopicAssignmentRecordV2": {
   631        "type": "object",
   632        "properties": {
   633          "documentId": {
   634            "description": "Identifier for the document. Equates to the ID included in the input.",
   635            "type": "string"
   636          },
   637          "topicId": {
   638            "description": "The topic ID which the document has been assigned to.",
   639            "type": "string"
   640          },
   641          "distance": {
   642            "format": "double",
   643            "description": "Document-to-topic affiliation score between 0 and 1. The lower a distance score the stronger the topic affiliation is.",
   644            "type": "number"
   645          }
   646        }
   647      }
   648    }
   649  }