From c460430877783731251bf694e8db92374f62a4ea Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Thu, 1 Nov 2018 13:58:23 +0530 Subject: [PATCH 01/24] adding v4 --- .../data-plane/QnAMaker/readme.md | 41 + .../QnAMaker/stable/v4.0/QnAMaker-Api.json | 1041 +++++++++++++++++ .../v4.0/examples/SuccessfulKbsResponse.json | 31 + 3 files changed, 1113 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/readme.md create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker-Api.json create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.md new file mode 100644 index 000000000000..2bf1dafcf35d --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.md @@ -0,0 +1,41 @@ +# Cognitive Services QnAMaker Api SDKs + +> see https://aka.ms/autorest + +Configuration for generating QnAMaker Api SDK. + +``` yaml +tag: QnAMaker +add-credentials: true +openapi-type: data-plane +``` + +The current release for the QnAMaker Api is `4.0`. + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +### QnAMaker Api- CSharp Settings +These settings apply only when `--csharp` is specified on the command line. + +``` yaml $(csharp) +csharp: + sync-methods: None + license-header: MICROSOFT_MIT_NO_VERSION + azure-arm: false + namespace: Microsoft.Azure.CognitiveServices.Language.QnAMaker + output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/Language/QnAMaker/Generated + clear-output-folder: true + +# csharp has support for modelAsExtensible now; replace modelAsString with that. +directive: + from: swagger-document + where: $..['x-ms-enum'] + transform: > + if( $['modelAsString'] ) { + $['modelAsExtensible'] = true; + $['modelAsString'] = false; + } +``` \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker-Api.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker-Api.json new file mode 100644 index 000000000000..1726e14fbb3e --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker-Api.json @@ -0,0 +1,1041 @@ +{ + "x-generator": "NSwag v11.13.2.0 (NJsonSchema v9.10.21.0 (Newtonsoft.Json v11.0.0.0))", + "swagger": "2.0", + "info": { + "title": "QnA Maker REST API", + "description": "QnA Maker REST API V4.0", + "version": "4.0" + }, + "host": "westus.api.cognitive.microsoft.com", + "basePath": "/qnamaker/v4.0", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/endpointkeys": { + "get": { + "summary": "Gets endpoint keys for an endpoint", + "operationId": "Get Endpoint Keys", + "parameters": [], + "responses": { + "200": { + "description": "response with endpoint info in it.", + "schema": { + "$ref": "#/definitions/EndpointKeysDTO" + }, + "x-nullable": true + } + } + } + }, + "/endpointkeys/{keyType}": { + "patch": { + "tags": [ + "EndpointKeys" + ], + "summary": "Re-generates an endpoint key.", + "operationId": "Refresh Endpoint Keys", + "parameters": [ + { + "type": "string", + "name": "keyType", + "in": "path", + "required": true, + "x-nullable": false, + "description": "type of Key" + } + ], + "responses": { + "200": { + "description": "Details of the endpoint keys generated.", + "schema": { + "$ref": "#/definitions/EndpointKeysDTO" + }, + "x-nullable": true + } + } + } + }, + "/alterations": { + "get": { + "tags": [ + "Alterations" + ], + "summary": "Download alterations from runtime.", + "operationId": "Download Alterations", + "parameters": [], + "responses": { + "200": { + "description": "Alterations data.", + "schema": { + "$ref": "#/definitions/WordAlterationsDTO" + }, + "x-nullable": true + } + } + }, + "put": { + "tags": [ + "Alterations" + ], + "summary": "Replace alterations data.", + "operationId": "Replace Alterations", + "parameters": [ + { + "name": "wordAlterations", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WordAlterationsDTO" + }, + "x-nullable": true, + "description": "New alterations data." + } + ], + "responses": { + "204": { + "description": "HTTP 204 No Content." + } + } + } + }, + "/knowledgebases": { + "get": { + "tags": [ + "Knowledgebases" + ], + "summary": "Gets all knowledgebases for a user.", + "operationId": "Get Knowledgebases for user", + "parameters": [], + "responses": { + "200": { + "description": "Collection of knowlegebases.", + "schema": { + "$ref": "#/definitions/KnowledgebasesDTO" + }, + "x-nullable": true + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } + } + } + }, + "/operations/{operationId}": { + "get": { + "tags": [ + "Operations" + ], + "summary": "Gets details of a specific long running operation.", + "operationId": "Get Operation Details", + "parameters": [ + { + "type": "string", + "name": "operationId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Operation id." + } + ], + "responses": { + "200": { + "description": "Details of the long running operation.", + "schema": { + "$ref": "#/definitions/Operation" + }, + "x-nullable": true, + "headers": { + "RetryAfter": { + "type": "integer", + "description": "Indicates how long the client should wait before sending a follow up request. The header will be present only if the operation is running or has not started yet." + } + } + } + } + } + }, + "/knowledgebases/{kbId}": { + "get": { + "tags": [ + "Knowledgebases" + ], + "summary": "Gets details of a specific knowledgebase.", + "operationId": "Get Knowledgebase Details", + "parameters": [ + { + "type": "string", + "name": "kbId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Knowledgebase id." + } + ], + "responses": { + "200": { + "description": "Details of the knowledgebase.", + "schema": { + "$ref": "#/definitions/KnowledgebaseDTO" + }, + "x-nullable": true + } + } + }, + "delete": { + "tags": [ + "Knowledgebases" + ], + "summary": "Deletes the knowledgebase and all its data.", + "operationId": "Delete Knowledgebase", + "parameters": [ + { + "type": "string", + "name": "kbId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Knowledgebase id." + } + ], + "responses": { + "204": { + "description": "HTTP 204 No content." + } + } + }, + "post": { + "tags": [ + "Knowledgebases" + ], + "summary": "Publishes all changes in test index of a knowledgebase to its prod index.", + "operationId": "Publish Knowledgebase", + "parameters": [ + { + "type": "string", + "name": "kbId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Knowledgebase id" + } + ], + "responses": { + "204": { + "description": "HTTP 204 No content." + } + } + }, + "put": { + "tags": [ + "Knowledgebases" + ], + "summary": "Replace knowledgebase contents.", + "operationId": "Replace Knowledgebase", + "parameters": [ + { + "type": "string", + "name": "kbId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Knowledgebase id" + }, + { + "name": "replaceKb", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReplaceKbDTO" + }, + "x-nullable": true, + "description": "An instance of ReplaceKbDTO which contains list of qnas to be uploaded" + } + ], + "responses": { + "204": { + "description": "HTTP 204 No content." + } + } + }, + "patch": { + "tags": [ + "Knowledgebases" + ], + "summary": "Asynchronous operation to modify a knowledgebase.", + "operationId": "Update Knowledgebase", + "parameters": [ + { + "type": "string", + "name": "kbId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Knowledgebase id" + }, + { + "name": "updateKb", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateKbOperationDTO" + }, + "x-nullable": true, + "description": "Post body of the request." + } + ], + "responses": { + "202": { + "description": "Details of the asynchronous operation.", + "schema": { + "$ref": "#/definitions/Operation" + }, + "x-nullable": true, + "headers": { + "Location": { + "type": "string", + "description": "Relative URI to the target location of the asynchronous operation. Client should poll this resource to get status of the operation." + } + } + } + } + } + }, + "/knowledgebases/create": { + "post": { + "tags": [ + "Knowledgebases" + ], + "summary": "Asynchronous operation to create a new knowledgebase.", + "operationId": "Create Knowledgebase", + "parameters": [ + { + "name": "createKbPayload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateKbDTO" + }, + "x-nullable": true, + "description": "Post body of the request." + } + ], + "responses": { + "202": { + "description": "Details of the asynchronous operation.", + "schema": { + "$ref": "#/definitions/Operation" + }, + "x-nullable": true + } + } + } + }, + "/knowledgebases/{kbId}/{environment}/qna": { + "get": { + "tags": [ + "Knowledgebases" + ], + "summary": "Download the knowledgebase.", + "operationId": "Download Knowledgebase", + "parameters": [ + { + "type": "string", + "name": "kbId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Knowledgebase id" + }, + { + "type": "string", + "name": "environment", + "in": "path", + "required": true, + "x-schema": { + "$ref": "#/definitions/KnowledgebaseEnvironment" + }, + "x-nullable": false, + "description": "Specifies whether environment is Test or Prod.", + "enum": [ + "Prod", + "Test" + ] + } + ], + "responses": { + "200": { + "description": "Collection of all Q-A in the knowledgebase.", + "schema": { + "$ref": "#/definitions/QnADocumentsDTO" + }, + "x-nullable": true + } + } + } + } + }, + "definitions": { + "UpdateKbOperationDTO": { + "type": "object", + "description": "Contains list of QnAs to be updated", + "additionalProperties": false, + "properties": { + "add": { + "description": "An instance of CreateKbInputDTO for add operation", + "allOf": [ + { + "$ref": "#/definitions/CreateKbInputDTO" + } + ] + }, + "delete": { + "description": "An instance of DeleteKbContentsDTO for delete Operation", + "allOf": [ + { + "$ref": "#/definitions/DeleteKbContentsDTO" + } + ] + }, + "update": { + "description": "An instance of UpdateKbContentsDTO for Update Operation", + "allOf": [ + { + "$ref": "#/definitions/UpdateKbContentsDTO" + } + ] + } + } + }, + "UpdateKbContentsDTO": { + "type": "object", + "description": "PATCH body schema for Update operation in Update Kb", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "Friendly name for the knowledgebase." + }, + "qnaList": { + "type": "array", + "description": "List of Q-A (UpdateQnaDTO) to be added to the knowledgebase.", + "items": { + "$ref": "#/definitions/UpdateQnaDTO" + } + }, + "urls": { + "type": "array", + "description": "List of existing URLs to be refreshed. The content will be extracted again and re-indexed.", + "maxLength": 10, + "items": { + "type": "string" + } + } + } + }, + "UpdateQnaDTO": { + "type": "object", + "description": "PATCH Body schema for Update Qna List", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique id for the Q-A", + "format": "int32", + "maximum": 2147483647, + "minimum": 0 + }, + "answer": { + "type": "string", + "description": "Answer text" + }, + "source": { + "type": "string", + "description": "Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs", + "maxLength": 300 + }, + "questions": { + "description": "List of questions associated with the answer.", + "allOf": [ + { + "$ref": "#/definitions/UpdateQuestionsDTO" + } + ] + }, + "metadata": { + "description": "List of metadata associated with the answer to be updated", + "allOf": [ + { + "$ref": "#/definitions/UpdateMetadataDTO" + } + ] + } + } + }, + "UpdateQuestionsDTO": { + "type": "object", + "description": "PATCH Body schema for Update Kb which contains list of questions to be added and deleted", + "additionalProperties": false, + "properties": { + "add": { + "type": "array", + "description": "List of questions to be added", + "maxLength": 100, + "items": { + "type": "string" + } + }, + "delete": { + "type": "array", + "description": "List of questions to be deleted.", + "maxLength": 100, + "items": { + "type": "string" + } + } + } + }, + "UpdateMetadataDTO": { + "type": "object", + "description": "PATCH Body schema to represent list of Metadata to be updated", + "additionalProperties": false, + "properties": { + "delete": { + "type": "array", + "description": "List of Metadata associated with answer to be deleted", + "maxLength": 100, + "items": { + "$ref": "#/definitions/MetadataDTO" + } + }, + "add": { + "type": "array", + "description": "List of Metadat associated with answer to be added", + "maxLength": 100, + "items": { + "$ref": "#/definitions/MetadataDTO" + } + } + } + }, + "DeleteKbContentsDTO": { + "type": "object", + "description": "PATCH body schema of Delete Operation in UpdateKb", + "additionalProperties": false, + "properties": { + "ids": { + "type": "array", + "description": "List of Qna Ids to be deleted", + "items": { + "type": "integer", + "format": "int32" + } + }, + "sources": { + "type": "array", + "description": "List of sources to be deleted from knowledgebase.", + "maxLength": 300, + "minLength": 1, + "items": { + "type": "string" + } + } + } + }, + "CreateKbInputDTO": { + "type": "object", + "description": "Input to create KB.", + "additionalProperties": false, + "properties": { + "qnaList": { + "type": "array", + "description": "list of QNA to be added to the index. Ids are generated by the service and should be omitted.", + "items": { + "$ref": "#/definitions/QnADTO" + } + }, + "urls": { + "type": "array", + "description": "List of URLs to be added to knowledgebase.", + "maxLength": 10, + "items": { + "type": "string" + } + }, + "files": { + "type": "array", + "description": "List of files to be added to knowledgebase.", + "maxLength": 10, + "items": { + "$ref": "#/definitions/FileDTO" + } + } + } + }, + "KnowledgebaseEnvironment": { + "type": "string", + "description": "Enumeration of knowledgebase environments.", + "x-enumNames": [ + "Prod", + "Test" + ], + "enum": [ + "Prod", + "Test" + ] + }, + "QnADocumentsDTO": { + "type": "object", + "description": "List of QnADTO", + "additionalProperties": false, + "properties": { + "qnaDocuments": { + "type": "array", + "description": "List of answers.", + "items": { + "$ref": "#/definitions/QnADTO" + } + } + } + }, + "CreateKbDTO": { + "type": "object", + "description": "Post body schema for CreateKb operation.", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Friendly name for the knowledgebase.", + "maxLength": 100, + "minLength": 1 + }, + "qnaList": { + "type": "array", + "description": "List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.", + "maxLength": 1000, + "items": { + "$ref": "#/definitions/QnADTO" + } + }, + "urls": { + "type": "array", + "description": "List of URLs to be used for extracting Q-A.", + "maxLength": 10, + "items": { + "type": "string" + } + }, + "files": { + "type": "array", + "description": "List of files from which to Extract Q-A.", + "maxLength": 10, + "items": { + "$ref": "#/definitions/FileDTO" + } + } + } + }, + "FileDTO": { + "type": "object", + "description": "DTO to hold details of uploaded files.", + "additionalProperties": false, + "required": [ + "fileName", + "fileUri" + ], + "properties": { + "fileName": { + "type": "string", + "description": "File name. Supported file types are \".tsv\", \".pdf\", \".txt\", \".docx\", \".xlsx\".", + "maxLength": 200, + "minLength": 1 + }, + "fileUri": { + "type": "string", + "description": "Public URI of the file." + } + } + }, + "ReplaceKbDTO": { + "type": "object", + "description": "Post body schema for Replace KB operation.", + "additionalProperties": false, + "required": [ + "qnAList" + ], + "properties": { + "qnAList": { + "type": "array", + "description": "List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.", + "items": { + "$ref": "#/definitions/QnADTO" + } + } + } + }, + "QnADTO": { + "type": "object", + "description": "Q-A object.", + "additionalProperties": false, + "required": [ + "answer", + "questions" + ], + "properties": { + "id": { + "type": "integer", + "description": "Unique id for the Q-A.", + "format": "int32" + }, + "answer": { + "type": "string", + "description": "Answer text", + "maxLength": 25000, + "minLength": 1 + }, + "source": { + "type": "string", + "description": "Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs", + "maxLength": 300 + }, + "questions": { + "type": "array", + "description": "List of questions associated with the answer.", + "maxLength": 100, + "minLength": 1, + "items": { + "type": "string" + } + }, + "metadata": { + "type": "array", + "description": "List of metadata associated with the answer.", + "maxLength": 10, + "items": { + "$ref": "#/definitions/MetadataDTO" + } + } + } + }, + "MetadataDTO": { + "type": "object", + "description": "Name - value pair of metadata.", + "additionalProperties": false, + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "Metadata name.", + "maxLength": 100, + "minLength": 1 + }, + "value": { + "type": "string", + "description": "Metadata value.", + "maxLength": 500, + "minLength": 1 + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "Error response. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "additionalProperties": false, + "properties": { + "error": { + "description": "The error object.", + "allOf": [ + { + "$ref": "#/definitions/Error" + } + ] + } + } + }, + "Error": { + "type": "object", + "description": "The error object. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "additionalProperties": false, + "required": [ + "code" + ], + "properties": { + "code": { + "description": "One of a server-defined set of error codes.", + "$ref": "#/definitions/ErrorCode" + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Error" + } + }, + "innerError": { + "description": "An object containing more specific information than the current object about the error.", + "$ref": "#/definitions/InnerErrorModel" + } + } + }, + "ErrorCode": { + "type": "string", + "description": "Human readable error code.", + "x-enumNames": [ + "BadArgument", + "Forbidden", + "NotFound", + "KbNotFound", + "Unauthorized", + "Unspecified", + "EndpointKeysError", + "QuotaExceeded", + "QnaRuntimeError", + "SKULimitExceeded", + "OperationNotFound", + "ServiceError", + "ValidationFailure", + "ExtractionFailure" + ], + "enum": [ + "BadArgument", + "Forbidden", + "NotFound", + "KbNotFound", + "Unauthorized", + "Unspecified", + "EndpointKeysError", + "QuotaExceeded", + "QnaRuntimeError", + "SKULimitExceeded", + "OperationNotFound", + "ServiceError", + "ValidationFailure", + "ExtractionFailure" + ] + }, + "InnerErrorModel": { + "type": "object", + "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.", + "additionalProperties": false, + "properties": { + "code": { + "type": "string", + "description": "A more specific error code than was provided by the containing error." + }, + "innerError": { + "description": "An object containing more specific information than the current object about the error.", + "$ref": "#/definitions/InnerErrorModel" + } + } + }, + "Operation": { + "type": "object", + "description": "Record to track long running operation.", + "additionalProperties": false, + "properties": { + "operationState": { + "description": "Operation state.", + "$ref": "#/definitions/OperationState" + }, + "createdTimestamp": { + "type": "string", + "description": "Timestamp when the operation was created." + }, + "lastActionTimestamp": { + "type": "string", + "description": "Timestamp when the current state was entered." + }, + "resourceLocation": { + "type": "string", + "description": "Relative URI to the target resource location for completed resources." + }, + "userId": { + "type": "string", + "description": "User Id" + }, + "operationId": { + "type": "string", + "description": "Operation Id." + }, + "errorResponse": { + "description": "Error details in case of failures.", + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "OperationState": { + "type": "string", + "description": "Enumeration of operation states.", + "x-enumNames": [ + "Failed", + "NotStarted", + "Running", + "Succeeded" + ], + "enum": [ + "Failed", + "NotStarted", + "Running", + "Succeeded" + ], + "x-ms-enum": { + "name": "OperationState", + "modelAsString": false + } + }, + "KnowledgebasesDTO": { + "type": "object", + "description": "Collection of knowledgebases owned by a user.", + "additionalProperties": false, + "properties": { + "knowledgebases": { + "type": "array", + "description": "Collection of knowledgebase records.", + "items": { + "$ref": "#/definitions/KnowledgebaseDTO" + } + } + } + }, + "KnowledgebaseDTO": { + "type": "object", + "description": "Response schema for CreateKb operation.", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "Unique id that identifies a knowledgebase." + }, + "hostName": { + "type": "string", + "description": "URL host name at which the knowledgebase is hosted." + }, + "lastAccessedTimestamp": { + "type": "string", + "description": "Time stamp at which the knowledgebase was last accessed (UTC)." + }, + "lastChangedTimestamp": { + "type": "string", + "description": "Time stamp at which the knowledgebase was last modified (UTC)." + }, + "lastPublishedTimestamp": { + "type": "string", + "description": "Time stamp at which the knowledgebase was last published (UTC)." + }, + "name": { + "type": "string", + "description": "Friendly name of the knowledgebase." + }, + "userId": { + "type": "string", + "description": "User who created / owns the knowledgebase." + }, + "urls": { + "type": "array", + "description": "URL sources from which Q-A were extracted and added to the knowledgebase.", + "items": { + "type": "string" + } + }, + "sources": { + "type": "array", + "description": "Custom sources from which Q-A were extracted or explicitly added to the knowledgebase.", + "items": { + "type": "string" + } + } + } + }, + "WordAlterationsDTO": { + "type": "object", + "description": "Collection of word alterations.", + "additionalProperties": false, + "required": [ + "wordAlterations" + ], + "properties": { + "wordAlterations": { + "type": "array", + "description": "Collection of word alterations.", + "maxLength": 10000, + "items": { + "$ref": "#/definitions/AlterationsDTO" + } + } + } + }, + "AlterationsDTO": { + "type": "object", + "description": "Collection of words that are synonyms.", + "additionalProperties": false, + "required": [ + "alterations" + ], + "properties": { + "alterations": { + "type": "array", + "description": "Words that are synonymous with each other.", + "maxLength": 20, + "minLength": 1, + "items": { + "type": "string" + } + } + } + }, + "EndpointKeysDTO": { + "type": "object", + "description": "Schema for EndpointKeys generate/refresh operations.", + "additionalProperties": false, + "properties": { + "primaryEndpointKey": { + "type": "string", + "description": "Primary Access Key." + }, + "secondaryEndpointKey": { + "type": "string", + "description": "Secondary Access Key." + }, + "installedVersion": { + "type": "string", + "description": "Current version of runtime." + }, + "lastStableVersion": { + "type": "string", + "description": "Latest version of runtime." + } + } + } + }, + "parameters": {}, + "responses": {}, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json new file mode 100644 index 000000000000..715bbda43870 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "knowledgebases": [ + { + "id": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", + "hostName": "https://myqnamakerbot.azurewebsites.net", + "lastAccessedTimestamp": "2018-03-16T10:59:46Z", + "lastChangedTimestamp": "2018-03-16T10:58:10Z", + "lastPublishedTimestamp": "2018-03-16T10:59:56Z", + "name": "My QnA Maker Bot", + "userId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1", + "urls": [ + "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq" + ], + "sources": [ + "Custom Editorial", + "SurfaceManual.pdf" + ] + } + ] + } + } + } +} \ No newline at end of file From d7bd4f3a34798c867ee23d27e7af2d95b99d8acd Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 12:31:11 +0530 Subject: [PATCH 02/24] Addressing comments --- .../data-plane/QnAMaker/readme.go.md | 26 +++++ .../data-plane/QnAMaker/readme.md | 94 +++++++++++++++---- .../v4.0/{QnAMaker-Api.json => QnAMaker.json} | 0 3 files changed, 102 insertions(+), 18 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/readme.go.md rename specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/{QnAMaker-Api.json => QnAMaker.json} (100%) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.go.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.go.md new file mode 100644 index 000000000000..9d2b7973bef7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.go.md @@ -0,0 +1,26 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + namespace: face + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: release_4_0 +``` + +### Tag: release_4_0 and go + +These settings apply only when `--tag=release_4_0 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'release_1_0' && $(go) +output-folder: $(go-sdk-folder)/services/cognitiveservices/v4.0/$(namespace) +``` \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.md index 2bf1dafcf35d..153467844420 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/readme.md +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.md @@ -1,41 +1,99 @@ -# Cognitive Services QnAMaker Api SDKs +# Cognitive Services QnAMaker SDK > see https://aka.ms/autorest -Configuration for generating QnAMaker Api SDK. +Configuration for generating QnAMaker SDK. + +The current release is `release_4_0`. ``` yaml -tag: QnAMaker + +tag: release_4_0 add-credentials: true openapi-type: data-plane ``` +# Releases + +### Release 4.0 +These settings apply only when `--tag=release_4_0` is specified on the command line. -The current release for the QnAMaker Api is `4.0`. +``` yaml $(tag) == 'release_4_0' +input-file: stable/v4.0/QnAMaker.json +``` ## Swagger to SDK This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself. -### QnAMaker Api- CSharp Settings -These settings apply only when `--csharp` is specified on the command line. +``` yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-sdk-for-node + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_cognitiveservices_qnamaker'] +``` + +## CSharp Settings +These settings apply only when `--csharp` is specified on the command line. ``` yaml $(csharp) csharp: sync-methods: None license-header: MICROSOFT_MIT_NO_VERSION azure-arm: false - namespace: Microsoft.Azure.CognitiveServices.Language.QnAMaker - output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/Language/QnAMaker/Generated + namespace: Microsoft.Azure.CognitiveServices.QnAMaker + output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/QnAMaker/Generated + clear-output-folder: true +``` + +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. + +``` yaml $(python) +python-mode: create +python: + license-header: MICROSOFT_MIT_NO_VERSION + add-credentials: true + payload-flattening-threshold: 2 + namespace: azure.cognitiveservices.qnamaker + package-name: azure-cognitiveservices-qnamaker clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-cognitiveservices-qnamaker/azure/cognitiveservices/qnamaker +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/azure-cognitiveservices-qnamaker +``` -# csharp has support for modelAsExtensible now; replace modelAsString with that. -directive: - from: swagger-document - where: $..['x-ms-enum'] - transform: > - if( $['modelAsString'] ) { - $['modelAsExtensible'] = true; - $['modelAsString'] = false; - } -``` \ No newline at end of file +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Java + +These settings apply only when `--java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(java) +java: + azure-arm: true + namespace: com.microsoft.azure.cognitiveservices.qnamaker + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 1 + output-folder: $(azure-libraries-for-java-folder)/cognitiveservices/data-plane/qnamaker + with-optional-parameters: true + with-single-async-method: true +``` diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker-Api.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json similarity index 100% rename from specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker-Api.json rename to specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json From d7c47f76700d9d7425e5833497d1fa127d30ed98 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 13:53:46 +0530 Subject: [PATCH 03/24] Use Endpoint Template --- .../QnAMaker/stable/v4.0/QnAMaker.json | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 1726e14fbb3e..cd4ea7b22db9 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -1,22 +1,31 @@ { - "x-generator": "NSwag v11.13.2.0 (NJsonSchema v9.10.21.0 (Newtonsoft.Json v11.0.0.0))", "swagger": "2.0", "info": { - "title": "QnA Maker REST API", - "description": "QnA Maker REST API V4.0", - "version": "4.0" + "version": "4.0", + "title": "QnAMaker Client", + "description": "An API for QnAMaker Service" }, - "host": "westus.api.cognitive.microsoft.com", - "basePath": "/qnamaker/v4.0", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apim_key": [] + } ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/qnamaker/v4.0", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + }, "paths": { "/endpointkeys": { "get": { @@ -1029,13 +1038,15 @@ } } }, - "parameters": {}, - "responses": {}, - "securityDefinitions": { - "ApiKeyAuth": { - "type": "apiKey", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "parameters": { + "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 } } } \ No newline at end of file From 39614cbfe1bf59abf12438ed30c33bb73d50ae9b Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 14:35:43 +0530 Subject: [PATCH 04/24] Switch to parameter --- .../QnAMaker/stable/v4.0/QnAMaker.json | 247 +++++++++--------- 1 file changed, 128 insertions(+), 119 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index cd4ea7b22db9..a511e2f90709 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -51,14 +51,9 @@ "summary": "Re-generates an endpoint key.", "operationId": "Refresh Endpoint Keys", "parameters": [ - { - "type": "string", - "name": "keyType", - "in": "path", - "required": true, - "x-nullable": false, - "description": "type of Key" - } + { + "$ref": "#/parameters/KeyType" + } ], "responses": { "200": { @@ -96,16 +91,9 @@ "summary": "Replace alterations data.", "operationId": "Replace Alterations", "parameters": [ - { - "name": "wordAlterations", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WordAlterationsDTO" - }, - "x-nullable": true, - "description": "New alterations data." - } + { + "$ref": "#/parameters/WordAlterations" + } ], "responses": { "204": { @@ -146,14 +134,9 @@ "summary": "Gets details of a specific long running operation.", "operationId": "Get Operation Details", "parameters": [ - { - "type": "string", - "name": "operationId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Operation id." - } + { + "$ref": "#/parameters/OperationId" + } ], "responses": { "200": { @@ -180,14 +163,9 @@ "summary": "Gets details of a specific knowledgebase.", "operationId": "Get Knowledgebase Details", "parameters": [ - { - "type": "string", - "name": "kbId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Knowledgebase id." - } + { + "$ref": "#/parameters/KbId" + } ], "responses": { "200": { @@ -206,14 +184,9 @@ "summary": "Deletes the knowledgebase and all its data.", "operationId": "Delete Knowledgebase", "parameters": [ - { - "type": "string", - "name": "kbId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Knowledgebase id." - } + { + "$ref": "#/parameters/KbId" + } ], "responses": { "204": { @@ -228,14 +201,9 @@ "summary": "Publishes all changes in test index of a knowledgebase to its prod index.", "operationId": "Publish Knowledgebase", "parameters": [ - { - "type": "string", - "name": "kbId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Knowledgebase id" - } + { + "$ref": "#/parameters/KbId" + } ], "responses": { "204": { @@ -250,24 +218,12 @@ "summary": "Replace knowledgebase contents.", "operationId": "Replace Knowledgebase", "parameters": [ - { - "type": "string", - "name": "kbId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Knowledgebase id" - }, - { - "name": "replaceKb", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReplaceKbDTO" - }, - "x-nullable": true, - "description": "An instance of ReplaceKbDTO which contains list of qnas to be uploaded" - } + { + "$ref": "#/parameters/KbId" + }, + { + "$ref": "#/parameters/ReplaceKb" + } ], "responses": { "204": { @@ -282,24 +238,12 @@ "summary": "Asynchronous operation to modify a knowledgebase.", "operationId": "Update Knowledgebase", "parameters": [ - { - "type": "string", - "name": "kbId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Knowledgebase id" - }, - { - "name": "updateKb", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateKbOperationDTO" - }, - "x-nullable": true, - "description": "Post body of the request." - } + { + "$ref": "#/parameters/KbId" + }, + { + "$ref": "#/parameters/UpdateKb" + } ], "responses": { "202": { @@ -326,16 +270,9 @@ "summary": "Asynchronous operation to create a new knowledgebase.", "operationId": "Create Knowledgebase", "parameters": [ - { - "name": "createKbPayload", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateKbDTO" - }, - "x-nullable": true, - "description": "Post body of the request." - } + { + "$ref": "#/parameters/CreateKbPayload" + } ], "responses": { "202": { @@ -356,29 +293,12 @@ "summary": "Download the knowledgebase.", "operationId": "Download Knowledgebase", "parameters": [ - { - "type": "string", - "name": "kbId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Knowledgebase id" - }, - { - "type": "string", - "name": "environment", - "in": "path", - "required": true, - "x-schema": { - "$ref": "#/definitions/KnowledgebaseEnvironment" - }, - "x-nullable": false, - "description": "Specifies whether environment is Test or Prod.", - "enum": [ - "Prod", - "Test" - ] - } + { + "$ref": "#/parameters/KbId" + }, + { + "$ref": "#/parameters/Environment" + } ], "responses": { "200": { @@ -1039,6 +959,95 @@ } }, "parameters": { + "Environment": + { + "type": "string", + "name": "environment", + "in": "path", + "required": true, + "x-schema": { + "$ref": "#/definitions/KnowledgebaseEnvironment" + }, + "x-nullable": false, + "description": "Specifies whether environment is Test or Prod.", + "enum": [ + "Prod", + "Test" + ] + }, + + "CreateKbPayload":{ + "name": "createKbPayload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateKbDTO" + }, + "x-nullable": true, + "description": "Post body of the request." + }, + + "UpdateKb": { + "name": "updateKb", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateKbOperationDTO" + }, + "x-nullable": true, + "description": "Post body of the request." + }, + "ReplaceKb": + { + "name": "replaceKb", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReplaceKbDTO" + }, + "x-nullable": true, + "description": "An instance of ReplaceKbDTO which contains list of qnas to be uploaded" + }, + "KbId": + { + "type": "string", + "name": "kbId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Knowledgebase id." + }, + + "OperationId": + { + "type": "string", + "name": "operationId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Operation id." + }, + + "WordAlterations": + { + "name": "wordAlterations", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WordAlterationsDTO" + }, + "x-nullable": true, + "description": "New alterations data." + }, + + "KeyType": { + "type": "string", + "name": "keyType", + "in": "path", + "required": true, + "x-nullable": false, + "description": "type of Key" + }, "Endpoint": { "name": "Endpoint", "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", From 873917d18fa286e83c1bffcb2c6affcb7a4bc16a Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 15:18:01 +0530 Subject: [PATCH 05/24] Formatting --- .../QnAMaker/stable/v4.0/QnAMaker.json | 326 +++++++++++------- 1 file changed, 197 insertions(+), 129 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index a511e2f90709..347805fd2f43 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -39,6 +39,12 @@ "$ref": "#/definitions/EndpointKeysDTO" }, "x-nullable": true + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } } @@ -51,9 +57,9 @@ "summary": "Re-generates an endpoint key.", "operationId": "Refresh Endpoint Keys", "parameters": [ - { - "$ref": "#/parameters/KeyType" - } + { + "$ref": "#/parameters/KeyType" + } ], "responses": { "200": { @@ -62,6 +68,12 @@ "$ref": "#/definitions/EndpointKeysDTO" }, "x-nullable": true + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } } @@ -81,6 +93,12 @@ "$ref": "#/definitions/WordAlterationsDTO" }, "x-nullable": true + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } }, @@ -91,13 +109,19 @@ "summary": "Replace alterations data.", "operationId": "Replace Alterations", "parameters": [ - { - "$ref": "#/parameters/WordAlterations" - } + { + "$ref": "#/parameters/WordAlterations" + } ], "responses": { "204": { "description": "HTTP 204 No Content." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } } @@ -117,6 +141,12 @@ "$ref": "#/definitions/KnowledgebasesDTO" }, "x-nullable": true + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -134,9 +164,9 @@ "summary": "Gets details of a specific long running operation.", "operationId": "Get Operation Details", "parameters": [ - { - "$ref": "#/parameters/OperationId" - } + { + "$ref": "#/parameters/OperationId" + } ], "responses": { "200": { @@ -151,6 +181,12 @@ "description": "Indicates how long the client should wait before sending a follow up request. The header will be present only if the operation is running or has not started yet." } } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } } @@ -163,9 +199,9 @@ "summary": "Gets details of a specific knowledgebase.", "operationId": "Get Knowledgebase Details", "parameters": [ - { - "$ref": "#/parameters/KbId" - } + { + "$ref": "#/parameters/KbId" + } ], "responses": { "200": { @@ -174,6 +210,12 @@ "$ref": "#/definitions/KnowledgebaseDTO" }, "x-nullable": true + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } }, @@ -184,13 +226,19 @@ "summary": "Deletes the knowledgebase and all its data.", "operationId": "Delete Knowledgebase", "parameters": [ - { - "$ref": "#/parameters/KbId" - } + { + "$ref": "#/parameters/KbId" + } ], "responses": { "204": { "description": "HTTP 204 No content." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } }, @@ -201,13 +249,19 @@ "summary": "Publishes all changes in test index of a knowledgebase to its prod index.", "operationId": "Publish Knowledgebase", "parameters": [ - { - "$ref": "#/parameters/KbId" - } + { + "$ref": "#/parameters/KbId" + } ], "responses": { "204": { "description": "HTTP 204 No content." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } }, @@ -218,16 +272,22 @@ "summary": "Replace knowledgebase contents.", "operationId": "Replace Knowledgebase", "parameters": [ - { - "$ref": "#/parameters/KbId" - }, - { - "$ref": "#/parameters/ReplaceKb" - } + { + "$ref": "#/parameters/KbId" + }, + { + "$ref": "#/parameters/ReplaceKb" + } ], "responses": { "204": { "description": "HTTP 204 No content." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } }, @@ -238,12 +298,12 @@ "summary": "Asynchronous operation to modify a knowledgebase.", "operationId": "Update Knowledgebase", "parameters": [ - { - "$ref": "#/parameters/KbId" - }, - { - "$ref": "#/parameters/UpdateKb" - } + { + "$ref": "#/parameters/KbId" + }, + { + "$ref": "#/parameters/UpdateKb" + } ], "responses": { "202": { @@ -258,6 +318,12 @@ "description": "Relative URI to the target location of the asynchronous operation. Client should poll this resource to get status of the operation." } } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } } @@ -270,9 +336,9 @@ "summary": "Asynchronous operation to create a new knowledgebase.", "operationId": "Create Knowledgebase", "parameters": [ - { - "$ref": "#/parameters/CreateKbPayload" - } + { + "$ref": "#/parameters/CreateKbPayload" + } ], "responses": { "202": { @@ -281,6 +347,12 @@ "$ref": "#/definitions/Operation" }, "x-nullable": true + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } } @@ -293,12 +365,12 @@ "summary": "Download the knowledgebase.", "operationId": "Download Knowledgebase", "parameters": [ - { - "$ref": "#/parameters/KbId" - }, - { - "$ref": "#/parameters/Environment" - } + { + "$ref": "#/parameters/KbId" + }, + { + "$ref": "#/parameters/Environment" + } ], "responses": { "200": { @@ -307,6 +379,12 @@ "$ref": "#/definitions/QnADocumentsDTO" }, "x-nullable": true + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } } @@ -959,96 +1037,86 @@ } }, "parameters": { - "Environment": - { - "type": "string", - "name": "environment", - "in": "path", - "required": true, - "x-schema": { - "$ref": "#/definitions/KnowledgebaseEnvironment" - }, - "x-nullable": false, - "description": "Specifies whether environment is Test or Prod.", - "enum": [ - "Prod", - "Test" - ] - }, - - "CreateKbPayload":{ - "name": "createKbPayload", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateKbDTO" - }, - "x-nullable": true, - "description": "Post body of the request." - }, - - "UpdateKb": { - "name": "updateKb", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateKbOperationDTO" - }, - "x-nullable": true, - "description": "Post body of the request." - }, - "ReplaceKb": - { - "name": "replaceKb", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReplaceKbDTO" - }, - "x-nullable": true, - "description": "An instance of ReplaceKbDTO which contains list of qnas to be uploaded" - }, - "KbId": - { - "type": "string", - "name": "kbId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Knowledgebase id." - }, - - "OperationId": - { - "type": "string", - "name": "operationId", - "in": "path", - "required": true, - "x-nullable": false, - "description": "Operation id." - }, - - "WordAlterations": - { - "name": "wordAlterations", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WordAlterationsDTO" - }, - "x-nullable": true, - "description": "New alterations data." - }, - - "KeyType": { - "type": "string", - "name": "keyType", - "in": "path", - "required": true, - "x-nullable": false, - "description": "type of Key" - }, - "Endpoint": { + "Environment": { + "type": "string", + "name": "environment", + "in": "path", + "required": true, + "x-schema": { + "$ref": "#/definitions/KnowledgebaseEnvironment" + }, + "x-nullable": false, + "description": "Specifies whether environment is Test or Prod.", + "enum": [ + "Prod", + "Test" + ] + }, + "CreateKbPayload": { + "name": "createKbPayload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateKbDTO" + }, + "x-nullable": true, + "description": "Post body of the request." + }, + "UpdateKb": { + "name": "updateKb", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateKbOperationDTO" + }, + "x-nullable": true, + "description": "Post body of the request." + }, + "ReplaceKb": { + "name": "replaceKb", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReplaceKbDTO" + }, + "x-nullable": true, + "description": "An instance of ReplaceKbDTO which contains list of qnas to be uploaded" + }, + "KbId": { + "type": "string", + "name": "kbId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Knowledgebase id." + }, + "OperationId": { + "type": "string", + "name": "operationId", + "in": "path", + "required": true, + "x-nullable": false, + "description": "Operation id." + }, + "WordAlterations": { + "name": "wordAlterations", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WordAlterationsDTO" + }, + "x-nullable": true, + "description": "New alterations data." + }, + "KeyType": { + "type": "string", + "name": "keyType", + "in": "path", + "required": true, + "x-nullable": false, + "description": "type of Key" + }, + "Endpoint": { "name": "Endpoint", "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", "x-ms-parameter-location": "client", From f9c021b3d14b637288c511ef12714a993440ef71 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 16:05:38 +0530 Subject: [PATCH 06/24] linter method issue --- .../QnAMaker/stable/v4.0/QnAMaker.json | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 347805fd2f43..38a9e3c0179f 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -1050,7 +1050,8 @@ "enum": [ "Prod", "Test" - ] + ], + "x-ms-parameter-location": "method" }, "CreateKbPayload": { "name": "createKbPayload", @@ -1060,7 +1061,8 @@ "$ref": "#/definitions/CreateKbDTO" }, "x-nullable": true, - "description": "Post body of the request." + "description": "Post body of the request.", + "x-ms-parameter-location": "method" }, "UpdateKb": { "name": "updateKb", @@ -1070,7 +1072,8 @@ "$ref": "#/definitions/UpdateKbOperationDTO" }, "x-nullable": true, - "description": "Post body of the request." + "description": "Post body of the request.", + "x-ms-parameter-location": "method" }, "ReplaceKb": { "name": "replaceKb", @@ -1080,7 +1083,8 @@ "$ref": "#/definitions/ReplaceKbDTO" }, "x-nullable": true, - "description": "An instance of ReplaceKbDTO which contains list of qnas to be uploaded" + "description": "An instance of ReplaceKbDTO which contains list of qnas to be uploaded", + "x-ms-parameter-location": "method" }, "KbId": { "type": "string", @@ -1088,7 +1092,8 @@ "in": "path", "required": true, "x-nullable": false, - "description": "Knowledgebase id." + "description": "Knowledgebase id.", + "x-ms-parameter-location": "method" }, "OperationId": { "type": "string", @@ -1096,7 +1101,8 @@ "in": "path", "required": true, "x-nullable": false, - "description": "Operation id." + "description": "Operation id.", + "x-ms-parameter-location": "method" }, "WordAlterations": { "name": "wordAlterations", @@ -1106,7 +1112,8 @@ "$ref": "#/definitions/WordAlterationsDTO" }, "x-nullable": true, - "description": "New alterations data." + "description": "New alterations data.", + "x-ms-parameter-location": "method" }, "KeyType": { "type": "string", @@ -1114,7 +1121,8 @@ "in": "path", "required": true, "x-nullable": false, - "description": "type of Key" + "description": "type of Key", + "x-ms-parameter-location": "method" }, "Endpoint": { "name": "Endpoint", From 65a10fab9e5a36c40668683f1ca95264e04c0c28 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 16:23:44 +0530 Subject: [PATCH 07/24] examples ALTS --- .../QnAMaker/stable/v4.0/QnAMaker.json | 60 +++++++++++++++++++ .../v4.0/examples/SuccessfulGetAlts.json | 32 ++++++++++ .../v4.0/examples/SuccessfulSetAlts.json | 33 ++++++++++ 3 files changed, 125 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 38a9e3c0179f..3e4c63c3ee18 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -46,6 +46,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } } }, @@ -75,6 +80,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } } }, @@ -100,6 +110,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulGetAlts.json" + } } }, "put": { @@ -123,6 +138,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulSetAlts.json" + } } } }, @@ -188,6 +208,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } } }, @@ -217,6 +242,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } }, "delete": { @@ -240,6 +270,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } }, "post": { @@ -263,6 +298,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } }, "put": { @@ -289,6 +329,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } }, "patch": { @@ -325,6 +370,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } } }, @@ -354,6 +404,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } } }, @@ -386,6 +441,11 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulKbsResponse.json" + } } } } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json new file mode 100644 index 000000000000..e5c30e0c60d8 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "wordAlterations": [ + { + "alterations": [ + "qnamaker", + "qna maker" + ] + }, + { + "alterations": [ + "botframework", + "bot framework" + ] + }, + { + "alterations": [ + "webchat", + "web chat" + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json new file mode 100644 index 000000000000..efde45954573 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "body": { + "wordAlterations": [ + { + "alterations": [ + "qnamaker", + "qna maker" + ] + }, + { + "alterations": [ + "botframework", + "bot framework" + ] + }, + { + "alterations": [ + "webchat", + "web chat" + ] + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": {} + } + } +} \ No newline at end of file From b2149175482224fbbdb272e31e4cf2d921265b04 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 16:32:41 +0530 Subject: [PATCH 08/24] example keys --- .../QnAMaker/stable/v4.0/QnAMaker.json | 4 ++-- .../v4.0/examples/SuccessfulGetEpKeys.json | 16 ++++++++++++++++ .../v4.0/examples/SuccessfulSetEpKeys.json | 17 +++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 3e4c63c3ee18..f832e55af8bd 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -49,7 +49,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulGetEpKeys.json" } } } @@ -83,7 +83,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulSetEpKeys.json" } } } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json new file mode 100644 index 000000000000..d069531bb83c --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "primaryEndpointKey": "73e88a14-694a-44d5-883b-184a68aa8530", + "secondaryEndpointKey": "b2c98c16-ca31-4294-8626-6c57454a5063", + "installedVersion": "4.0.5", + "lastStableVersion": "4.0.6" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json new file mode 100644 index 000000000000..6fb4efe6a790 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "keyType": "PrimaryKey" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "primaryEndpointKey": "73e88a14-694a-44d5-883b-184a68aa8530", + "secondaryEndpointKey": "b2c98c16-ca31-4294-8626-6c57454a5063", + "installedVersion": "4.0.5", + "lastStableVersion": "4.0.6" + } + } + } +} \ No newline at end of file From f4a3b926fea64a5bd7e7f4018771e7f21c9e288c Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 16:37:43 +0530 Subject: [PATCH 09/24] ops example --- .../QnAMaker/stable/v4.0/QnAMaker.json | 2 +- .../v4.0/examples/SuccessfulGetOps.json | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index f832e55af8bd..b0dc8d903586 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -211,7 +211,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulGetOps.json" } } } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json new file mode 100644 index 000000000000..61ff7522ad18 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "operationId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "operationState": "Succeeded", + "createdTimestamp": "2018-03-19T07:38:46Z", + "lastActionTimestamp": "2018-03-19T07:39:29Z", + "resourceLocation": "https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/knowledgebases/9d091697-fb8c-4ed5-9ac0-35bf8273bfff", + "userId": "86bb8390-56c0-42c2-9f81-3de161981191", + "operationId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1" + } + } + } +} \ No newline at end of file From ba07f3953e350a49e47d21b28f09ba4f42311765 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 16:53:08 +0530 Subject: [PATCH 10/24] Add kb example --- .../QnAMaker/stable/v4.0/QnAMaker.json | 10 +- .../stable/v4.0/examples/SuccessfulDelKb.json | 12 +++ .../stable/v4.0/examples/SuccessfulGetKb.json | 28 +++++ .../stable/v4.0/examples/SuccessfulPubKb.json | 12 +++ .../stable/v4.0/examples/SuccessfulRepKb.json | 30 ++++++ .../stable/v4.0/examples/SuccessfulUpdKb.json | 101 ++++++++++++++++++ 6 files changed, 188 insertions(+), 5 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index b0dc8d903586..a8b3e38c72dd 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -245,7 +245,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulGetKb.json" } } }, @@ -273,7 +273,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulDelKb.json" } } }, @@ -301,7 +301,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulPubKb.json" } } }, @@ -332,7 +332,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulRepKb.json" } } }, @@ -373,7 +373,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulUpdKb.json" } } } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json new file mode 100644 index 000000000000..7b5a0fe05fa5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" + }, + "responses": { + "204": { + "headers": {}, + "body": {} + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json new file mode 100644 index 000000000000..178b2d2e8d58 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", + "hostName": "https://myqnamakerbot.azurewebsites.net", + "lastAccessedTimestamp": "2018-03-16T10:59:46Z", + "lastChangedTimestamp": "2018-03-16T10:58:10Z", + "lastPublishedTimestamp": "2018-03-16T10:59:56Z", + "name": "My QnA Maker Bot", + "userId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1", + "urls": [ + "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq" + ], + "sources": [ + "Custom Editorial", + "SurfaceManual.pdf" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json new file mode 100644 index 000000000000..7b5a0fe05fa5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" + }, + "responses": { + "204": { + "headers": {}, + "body": {} + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json new file mode 100644 index 000000000000..907694a32459 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", + "body": { + "qnAList": [ + { + "id": 0, + "answer": "string", + "source": "string", + "questions": [ + "string" + ], + "metadata": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + }, + "responses": { + "204": { + "headers": {}, + "body": {} + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json new file mode 100644 index 000000000000..7b3f879e80c0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", + "body": { + "add": { + "qnaList": [ + { + "id": 0, + "answer": "You can change the default message if you use the QnAMakerDialog. See this for details: https://docs.botframework.com/en-us/azure-bot-service/templates/qnamaker/#navtitle", + "source": "Custom Editorial", + "questions": [ + "How can I change the default message from QnA Maker?" + ], + "metadata": [] + }, + { + "id": 0, + "answer": "You can use our REST apis to manage your KB. See here for details: https://westus.dev.cognitive.microsoft.com/docs/services/58994a073d9e04097c7ba6fe/operations/58994a073d9e041ad42d9baa", + "source": "Custom Editorial", + "questions": [ + "How do I programmatically update my KB?" + ], + "metadata": [ + { + "name": "category", + "value": "api" + } + ] + } + ], + "urls": [ + "https://docs.microsoft.com/en-us/azure/cognitive-services/Emotion/FAQ" + ], + "files": [ + { + "fileName": "SurfaceManual.pdf", + "fileUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf" + } + ] + }, + "delete": { + "ids": [ + 4, + 13, + 35 + ], + "sources": [ + "Custom Editorial" + ] + }, + "update": { + "name": "QnA Maker + Emotion API FAQ Bot", + "qnaList": [ + { + "id": 30, + "answer": "Yes, you can use our REST APIs to manage a KB. Please check our documentation for details.", + "source": "Custom Q&A", + "questions": { + "add": [ + "can I programmatically manage a KB?" + ], + "delete": [ + "How do I programmatically update my KB?" + ] + }, + "metadata": { + "delete": [ + { + "name": "category", + "value": "api" + } + ], + "add": [ + { + "name": "category", + "value": "programmatic" + } + ] + } + } + ], + "urls": [ + "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq" + ] + } + } + }, + "responses": { + "202": { + "headers": {}, + "body": { + "operationState": "NotStarted", + "createdTimestamp": "2018-03-19T07:38:46Z", + "lastActionTimestamp": "2018-03-19T07:39:29Z", + "userId": "86bb8390-56c0-42c2-9f81-3de161981191", + "operationId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1" + } + } + } +} \ No newline at end of file From 02e0b629621e0bde6e62286283e324aab7a5b8b2 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 18:21:27 +0530 Subject: [PATCH 11/24] Adding Create Kb Example --- .../QnAMaker/stable/v4.0/QnAMaker.json | 2 +- .../v4.0/examples/SuccessfulCreateKb.json | 55 +++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index a8b3e38c72dd..6c1e537ed411 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -407,7 +407,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulCreateKb.json" } } } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json new file mode 100644 index 000000000000..1dceacf8f178 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "body": { + "name": "QnA Maker FAQ", + "qnaList": [ + { + "id": 0, + "answer": "You can change the default message if you use the QnAMakerDialog. See this for details: https://docs.botframework.com/en-us/azure-bot-service/templates/qnamaker/#navtitle", + "source": "Custom Editorial", + "questions": [ + "How can I change the default message from QnA Maker?" + ], + "metadata": [] + }, + { + "id": 0, + "answer": "You can use our REST apis to manage your KB. See here for details: https://westus.dev.cognitive.microsoft.com/docs/services/58994a073d9e04097c7ba6fe/operations/58994a073d9e041ad42d9baa", + "source": "Custom Editorial", + "questions": [ + "How do I programmatically update my KB?" + ], + "metadata": [ + { + "name": "category", + "value": "api" + } + ] + } + ], + "urls": [ + "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq" + ], + "files": [ + { + "fileName": "SurfaceManual.pdf", + "fileUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf" + } + ] + } + }, + "responses": { + "202": { + "headers": {}, + "body": { + "operationState": "NotStarted", + "createdTimestamp": "2018-03-19T07:38:46Z", + "lastActionTimestamp": "2018-03-19T07:39:29Z", + "userId": "86bb8390-56c0-42c2-9f81-3de161981191", + "operationId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1" + } + } + } +} \ No newline at end of file From 9bfa5bed683f4010770e59449c0bd5bb01e1c3d6 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 2 Nov 2018 18:25:43 +0530 Subject: [PATCH 12/24] Download KB Example --- .../QnAMaker/stable/v4.0/QnAMaker.json | 2 +- .../v4.0/examples/SuccessfulDownloadKb.json | 372 ++++++++++++++++++ 2 files changed, 373 insertions(+), 1 deletion(-) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 6c1e537ed411..8a406ec9c585 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -444,7 +444,7 @@ }, "x-ms-examples": { "Successful query": { - "$ref": "./examples/SuccessfulKbsResponse.json" + "$ref": "./examples/SuccessfulDownloadKb.json" } } } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json new file mode 100644 index 000000000000..051380f72c4d --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json @@ -0,0 +1,372 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", + "environment": "Test" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "qnaDocuments": [ + { + "id": 1, + "answer": "You can change the default message if you use the QnAMakerDialog. See this for details: https://docs.botframework.com/en-us/azure-bot-service/templates/qnamaker/#navtitle", + "source": "Custom Editorial", + "questions": [ + "How can I change the default message from QnA Maker?" + ], + "metadata": [] + }, + { + "id": 2, + "answer": "You can use our REST apis to manage your KB. See here for details: https://westus.dev.cognitive.microsoft.com/docs/services/58994a073d9e04097c7ba6fe/operations/58994a073d9e041ad42d9baa", + "source": "Custom Editorial", + "questions": [ + "How do I programmatically update my KB?" + ], + "metadata": [ + { + "name": "category", + "value": "api" + } + ] + }, + { + "id": 3, + "answer": "QnA Maker provides an FAQ data source that you can query from your bot or application. Although developers will find this useful, content owners will especially benefit from this tool. QnA Maker is a completely no-code way of managing the content that powers your bot or application.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "Who is the target audience for the QnA Maker tool?" + ], + "metadata": [] + }, + { + "id": 4, + "answer": "

You can sign in with your Microsoft account

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How do I sign in to the QnA Maker portal?" + ], + "metadata": [] + }, + { + "id": 5, + "answer": "

Yes, currently the QnA Maker tool is free to use. However, usage is metered for each account. For more information, see Authentication and subscription keys

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "Is the QnA Maker Service free?" + ], + "metadata": [] + }, + { + "id": 6, + "answer": "It’s possible that the tool can't auto-extract some question-and-answer (QnA) content from valid FAQ URLs. In such cases, you can paste the QnA content in a .txt file and see if the tool can ingest it. Alternately, you can editorially add content to your knowledge base.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "My URLs have valid FAQ content, but the tool cannot extract them. Why not?" + ], + "metadata": [] + }, + { + "id": 7, + "answer": "

The tool supports the following file formats for ingestion:

  • .tsv: QnA contained in the format Question(tab)Answer.
  • .txt, .docx, .pdf: QnA contained as regular FAQ content--that is, a sequence of questions and answers.
", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "What format does the tool expect for the file content?" + ], + "metadata": [] + }, + { + "id": 8, + "answer": "

No, you don’t. However, QnA Maker is offered as one of several templates in Azure Bot Service. Bot Service enables rapid intelligent bot development through Microsoft Bot Framework, and it runs in a serverless environment.

Bots scale based on demand. You pay for only the resources that you consume.

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "Do I need to use Bot Framework in order to use QnA Maker?" + ], + "metadata": [] + }, + { + "id": 9, + "answer": "

QnAMaker provides a REST endpoint that you can call from any bot code. However, if you'd like a quick way to set up a QnAMaker bot, you can use the Azure Bot Service. Follow the instructions here and choose the \"Question and Answer\" bot template. Once the bot is created, you will need to do the following steps to complete setup.

  1. In Azure portal, open the newly created Web App Bot resource.
  2. Click on \"Application Settings\" and in the App Settings list, add QnASubscriptionKey and QnAKnowledgebaseId. The corresponding values can be obtained from the KB Settings page in http://qnamaker.ai.
  3. The QnAMaker-enabled Azure bot service app is now ready to use. To try it out click on \"Test in Web Chat\" to chat with your QnA bot.
", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How can I create a bot with QnAMaker?" + ], + "metadata": [] + }, + { + "id": 10, + "answer": "

Follow these steps to embed the QnA Maker service as a web-chat control in your website:

  1. Create your knowledge base from the QnA Maker webpage.
  2. Create your bot as shown in Create a bot with the Azure Bot Service.
  3. Look for the Question and Answer bot template.
  4. Enable the bot on the Web Chat channel. Get the embed keys.
  5. Embed the web chat as shown in Connect a bot to Web Chat.
", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How do I embed the QnA Maker service in my website?" + ], + "metadata": [] + }, + { + "id": 11, + "answer": "Currently, the QnA Maker tool handles semi-structured FAQ content and certain types of product manuals. Eventually, the vision is to be able to answer questions from unstructured content as well.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "What is the roadmap of QnA Maker?" + ], + "metadata": [] + }, + { + "id": 12, + "answer": "Currently, the limit is a 20-MB knowledge base.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How large a knowledge base can I create?" + ], + "metadata": [] + }, + { + "id": 13, + "answer": "Every edit operation, whether in a table update, test, or settings, needs to be saved before it can be published. Be sure to select the Save and retrain button after every edit operation.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "The updates that I made to my knowledge base are not reflected on publish. Why not?" + ], + "metadata": [] + }, + { + "id": 14, + "answer": "The upload feature expects the file to be formatted as tab-separated columns of question, answer, and source.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "Why can’t I replace my knowledge base with the upload feature?" + ], + "metadata": [] + }, + { + "id": 15, + "answer": "You should refresh your subscription keys if you suspect that they have been compromised. Any requests with your subscription key will count toward your quota.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "When should I refresh my subscription keys?" + ], + "metadata": [] + }, + { + "id": 16, + "answer": "The QnA Maker tool stores all knowledge base content in Azure Storage. You need a combination of knowledge base ID and subscription key to access the knowledge base. The tool doesn't use knowledge base content for any other purpose.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How safe is the data in my knowledge base?" + ], + "metadata": [] + }, + { + "id": 17, + "answer": "

The knowledge base supports Markdown. However, the auto-extraction from URLs has limited HTML-to-Markdown conversion capability. If you want to use full-fledged Markdown, you can modify your content directly in the table, or upload a knowledge base with the rich content.

Multimedia, such as images and videos, is not supported at this time.

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "Does the knowledge base support rich data or multimedia?" + ], + "metadata": [] + }, + { + "id": 18, + "answer": "

The QnA Maker tool ingests and matches data in UTF-16 encoding. Any language should work as is. But, we have extensively tested the relevance of the service for English only.

If you have content from multiple languages, be sure to create a separate service for each language.

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "Does QnA Maker support non-English languages?" + ], + "metadata": [] + }, + { + "id": 19, + "answer": "The chat logs are tab-separated files, with the query and the frequency as the columns. Frequency is the number of times that the same query was seen. The file is sorted in descending order of frequency. Select questions from the downloaded file that you want to test, and then upload it to see what responses the system returned for them.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "What is the format of the downloaded chat logs?" + ], + "metadata": [] + }, + { + "id": 20, + "answer": "

The new service doesn't include the test URL. The reason is that all calls are metered, as part of Cognitive Services. Because the test URL exposed the subscription key and the knowledge base ID, it was a security risk.

However, it's still easy to share your knowledge base and use it in chats. Check out the Azure Bot Service template for the Question and Answer bot. You can create the Question and Answer bot in Skype in a few clicks, and then share it with anyone.

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "Where is the test web-chat URL from the old portal? How do I share my knowledge base with others now?" + ], + "metadata": [] + }, + { + "id": 21, + "answer": "

Current transaction limits are 10 calls per minute and 10,000 calls per month. If you require higher limits, a free premium tier is available with limits of 1,000 calls per minute and 500,000 calls per month. To sign up for this option, fill in the request form. Note that these tiers are subject to change when the tool goes to general availability.

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How can I increase the transaction limits?" + ], + "metadata": [] + }, + { + "id": 22, + "answer": "

If QnA Maker doesn't match any of the questions, it shows a default \"Sorry, no match found\" message. You can change this default message in the code-behind by using the QnAMakerDialog object. For more information, see Create a bot using the Question and Answer template.

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How can I change the default message when no good match is found?" + ], + "metadata": [] + }, + { + "id": 23, + "answer": "The tool parses only public URLs and does not support authenticated data sources at this time. Alternately, you can download the file and use the file-upload option to extract questions and answers.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "Why is my SharePoint link not getting extracted?" + ], + "metadata": [] + }, + { + "id": 24, + "answer": "

There is no direct integration of LUIS with QnA Maker. But, in your bot code, you can use LUIS and QnA Maker together. View a sample bot

", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How can I integrate LUIS with QnA Maker?" + ], + "metadata": [] + }, + { + "id": 25, + "answer": "QnAMaker is currently in free Preview and does not have support SLAs. If you want to report an issue or provide feedback, you do so on UserVoice through the \"Feedback\" button in the top navigation bar.", + "source": "https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", + "questions": [ + "How can I report issues or contact support for QnAMaker?" + ], + "metadata": [] + }, + { + "id": 26, + "answer": "

While the Conversation User Interface (CUI) is upon us, at this point few developers have the expertise and tools needed to create new conversational experiences or enable existing applications and services with a conversational interface their users can enjoy. We have created the Bot Framework to make it easier for developers to build and connect great bots to users, wherever they converse, including on Microsoft's premier channels.

Channels

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "Why did Microsoft develop the Bot Framework?" + ], + "metadata": [] + }, + { + "id": 27, + "answer": "

We plan on making continuous improvements to the Bot Framework, including additional channels, but cannot provide a schedule at this time.If you would like a specific channel added to the framework, let us know.

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "When will you add more conversation experiences to the Bot Framework?" + ], + "metadata": [] + }, + { + "id": 28, + "answer": "

We have not provided a general mechanism for developers to add new channels to Bot Framework, but you can connect your bot to your app via the Direct Line API. If you are a developer of a communication channel and would like to work with us to enable your channel in the Bot Framework we’d love to hear from you.

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "I have a communication channel I’d like to be configurable with Bot Framework. Can I work with Microsoft to do that?" + ], + "metadata": [] + }, + { + "id": 29, + "answer": "

The Bot Framework is designed to build, connect, and deploy high quality, responsive, performant and scalable bots for Skype and many other channels. The SDK can be used to create text/sms, image, button and card-capable bots (which constitute the majority of bot interactions today across conversation experiences) as well as bot interactions which are Skype-specific such as rich audio and video experiences.

If you already have a great bot and would like to reach the Skype audience, your bot can easily be connected to Skype (or any supported channel) via the Bot Builder for REST API (provided it has an internet-accessible REST endpoint).

Security and Privacy

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "If I want to create a bot for Skype, what tools and services should I use?" + ], + "metadata": [] + }, + { + "id": 30, + "answer": "

Each bot is its own service, and developers of these services are required to provide Terms of Service and Privacy Statements per their Developer Code of Conduct. You can access this information from the bot’s card in the Bot Directory.

to provide the I/O service, the Bot Framework transmits your message and message content (including your ID), from the chat service you used to the bot.

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "Do the bots registered with the Bot Framework collect personal information? If yes, how can I be sure the data is safe and secure? What about privacy?" + ], + "metadata": [] + }, + { + "id": 31, + "answer": "Users have a way to report a misbehaving bot via the bot’s contact card in the directory. Developers must abide by Microsoft terms of service to participate in the service.", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "How do you ban or remove bots from the service?" + ], + "metadata": [] + }, + { + "id": 32, + "answer": "

You'll need to whitelist the following URLs in your corporate firewall:

  • login.botframework.com (Bot authentication)
  • login.microsoftonline.com (Bot authentication)
  • westus.api.cognitive.microsoft.com (for Luis.ai NLP integration)
  • state.botframework.com (Bot state storage for prototyping)
  • cortanabfchanneleastus.azurewebsites.net (Cortana channel)
  • cortanabfchannelwestus.azurewebsites.net (Cortana Channel)
  • *.botFramework.com (channels)

Rate limiting

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "Which specific URLs do I need to whitelist in my corporate firewall to access bot services?" + ], + "metadata": [] + }, + { + "id": 33, + "answer": "The Bot Framework service must protect itself and its customers against abusive call patterns (e.g., denial of service attack), so that no single bot can adversely affect the performance of other bots. To achieve this kind of protection, we’ve added rate limits (also known as throttling) to all endpoints. By enforcing a rate limit, we can restrict the frequency with which a bot can make a specific call. For example: with rate limiting enabled, if a bot wanted to post a large number of activities, it would have to space them out over a time period. Please note that the purpose of rate-limiting is not to cap the total volume for a bot. It is designed to prevent abuse of the conversational infrastructure that does not follow human conversation patterns.", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "What is rate limiting?" + ], + "metadata": [] + }, + { + "id": 34, + "answer": "It is unlikely you’ll experience rate limiting, even at high volume. Most rate limiting would only occur due to bulk sending of activities (from a bot or from a client), extreme load testing, or a bug. When a request is throttled, an HTTP 429 (Too Many Requests) response is returned along with a Retry-After header indicating the amount of time (in seconds) to wait before retrying the request would succeed. You can collect this information by enabling analytics for your bot via Azure Application Insights. Or, you can add code in your bot to log messages. ", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "How will I know if I’m impacted?" + ], + "metadata": [] + }, + { + "id": 35, + "answer": "

It can happen if:

  • a bot sends messages too frequently
  • a client of a bot sends messages too frequently
  • Direct Line clients request a new Web Socket too frequently
", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "How does rate limiting occur?" + ], + "metadata": [] + }, + { + "id": 36, + "answer": "

We’re continuously tuning the rate limits to make them as lenient as possible while at the same time protecting our service and our users. Because thresholds will occasionally change, we aren’t publishing the numbers at this time. If you are impacted by rate limiting, feel free to reach out to us at bf-reports@microsoft.com.

Related Services

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "What are the rate limits?" + ], + "metadata": [] + }, + { + "id": 37, + "answer": "

Both the Bot Framework and Cognitive Services are new capabilities introduced at Microsoft Build 2016 that will also be integrated into Cortana Intelligence Suite at GA. Both these services are built from years of research and use in popular Microsoft products. These capabilities combined with ‘Cortana Intelligence’ enable every organization to take advantage of the power of data, the cloud and intelligence to build their own intelligent systems that unlock new opportunities, increase their speed of business and lead the industries in which they serve their customers.

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "How does the Bot Framework relate to Cognitive Services?" + ], + "metadata": [] + }, + { + "id": 38, + "answer": "

Cortana Intelligence is a fully managed Big Data, Advanced Analytics and Intelligence suite that transforms your data into intelligent action.It is a comprehensive suite that brings together technologies founded upon years of research and innovation throughout Microsoft (spanning advanced analytics, machine learning, big data storage and processing in the cloud) and:

  • Allows you to collect, manage and store all your data that can seamlessly and cost effectively grow over time in a scalable and secure way.
  • Provides easy and actionable analytics powered by the cloud that allow you to predict, prescribe and automate decision making for the most demanding problems.
  • Enables intelligent systems through cognitive services and agents that allow you to see, hear, interpret and understand the world around you in more contextual and natural ways.

With Cortana Intelligence, we hope to help our enterprise customers unlock new opportunities, increase their speed of business and be leaders in their industries.

", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "What is Cortana Intelligence?" + ], + "metadata": [] + }, + { + "id": 39, + "answer": "

Direct Line is a REST API that allows you to add your bot into your service, mobile app, or webpage.

You can write a client for the Direct Line API in any language. Simply code to the Direct Line protocol, generate a secret in the Direct Line configuration page, and talk to your bot from wherever your code lives.

Direct Line is suitable for:

  • Mobile apps on iOS, Android, and Windows Phone, and others
  • Desktop applications on Windows, OSX, and more
  • Webpages where you need more customization than the embeddable Web Chat channel offers
  • Service-to-service applications
", + "source": "https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq", + "questions": [ + "What is the Direct Line channel?" + ], + "metadata": [] + } + ] + } + } + } +} \ No newline at end of file From 6e9fa43d8d69ccda46069adb043d969af500ee3e Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Sat, 3 Nov 2018 07:51:30 +0530 Subject: [PATCH 13/24] Fix Namespaces --- .../data-plane/QnAMaker/readme.go.md | 4 ++-- .../data-plane/QnAMaker/readme.md | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.go.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.go.md index 9d2b7973bef7..412a87aa9eac 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/readme.go.md +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.go.md @@ -5,7 +5,7 @@ These settings apply only when `--go` is specified on the command line. ``` yaml $(go) go: license-header: MICROSOFT_APACHE_NO_VERSION - namespace: face + namespace: qnamaker clear-output-folder: true ``` @@ -21,6 +21,6 @@ batch: These settings apply only when `--tag=release_4_0 --go` is specified on the command line. Please also specify `--go-sdk-folder=`. -``` yaml $(tag) == 'release_1_0' && $(go) +``` yaml $(tag) == 'release_4_0' && $(go) output-folder: $(go-sdk-folder)/services/cognitiveservices/v4.0/$(namespace) ``` \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.md index 153467844420..aac4f3cd0d86 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/readme.md +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.md @@ -46,8 +46,8 @@ csharp: sync-methods: None license-header: MICROSOFT_MIT_NO_VERSION azure-arm: false - namespace: Microsoft.Azure.CognitiveServices.QnAMaker - output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/QnAMaker/Generated + namespace: Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker + output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/Knowledge/QnAMaker/Generated clear-output-folder: true ``` @@ -63,19 +63,19 @@ python: license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true payload-flattening-threshold: 2 - namespace: azure.cognitiveservices.qnamaker - package-name: azure-cognitiveservices-qnamaker + namespace: azure.cognitiveservices.knowledge.qnamaker + package-name: azure-cognitiveservices-knowledge-qnamaker clear-output-folder: true ``` ``` yaml $(python) && $(python-mode) == 'update' python: no-namespace-folders: true - output-folder: $(python-sdks-folder)/azure-cognitiveservices-qnamaker/azure/cognitiveservices/qnamaker + output-folder: $(python-sdks-folder)/azure-cognitiveservices-qnamaker/azure/cognitiveservices/knowledge/qnamaker ``` ``` yaml $(python) && $(python-mode) == 'create' python: basic-setup-py: true - output-folder: $(python-sdks-folder)/azure-cognitiveservices-qnamaker + output-folder: $(python-sdks-folder)/azure-cognitiveservices-knowledge-qnamaker ``` ## Go @@ -90,10 +90,10 @@ Please also specify `--azure-libraries-for-java-folder= Date: Thu, 15 Nov 2018 14:26:26 +0530 Subject: [PATCH 14/24] model validation errors --- .../QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json | 4 +++- .../QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json | 5 +++-- .../QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json | 2 ++ .../QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json | 2 ++ .../QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json | 2 ++ .../QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json | 2 ++ .../QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json | 2 ++ .../stable/v4.0/examples/SuccessfulKbsResponse.json | 2 ++ .../QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json | 3 ++- .../QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json | 5 +++-- .../QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json | 6 ++++-- .../QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json | 2 ++ .../QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json | 4 +++- 13 files changed, 32 insertions(+), 9 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json index 1dceacf8f178..968922045d74 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulCreateKb.json @@ -1,7 +1,9 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", - "body": { + "createKbPayload": { "name": "QnA Maker FAQ", "qnaList": [ { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json index 7b5a0fe05fa5..35391cbe6f62 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDelKb.json @@ -1,12 +1,13 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" }, "responses": { "204": { - "headers": {}, - "body": {} + "body": "" } } } \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json index 051380f72c4d..ac17a06b040c 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json @@ -1,5 +1,7 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", "environment": "Test" diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json index e5c30e0c60d8..d8ac5cf786a9 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json @@ -1,5 +1,7 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json index d069531bb83c..2b7f17e3d84f 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json @@ -1,5 +1,7 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json index 178b2d2e8d58..03ffcaa9d7a1 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json @@ -1,5 +1,7 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json index 61ff7522ad18..1769fd26215e 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json @@ -1,5 +1,7 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "operationId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json index 715bbda43870..a2442b4c773a 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json @@ -1,5 +1,7 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json index 7b5a0fe05fa5..6ce8e4abc1bc 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json @@ -1,11 +1,12 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" }, "responses": { "204": { - "headers": {}, "body": {} } } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json index 907694a32459..4f9b2c55a31b 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json @@ -1,8 +1,10 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", - "body": { + "replaceKb": { "qnAList": [ { "id": 0, @@ -23,7 +25,6 @@ }, "responses": { "204": { - "headers": {}, "body": {} } } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json index efde45954573..5f6057b39212 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json @@ -1,7 +1,9 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", - "body": { + "wordAlterations": { "wordAlterations": [ { "alterations": [ @@ -25,7 +27,7 @@ } }, "responses": { - "200": { + "204": { "headers": {}, "body": {} } diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json index 6fb4efe6a790..a2fcd4e250f0 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json @@ -1,5 +1,7 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "keyType": "PrimaryKey" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json index 7b3f879e80c0..7217c27d2591 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json @@ -1,8 +1,10 @@ { "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", - "body": { + "updateKb": { "add": { "qnaList": [ { From 2e9afe35b667b94e08ca5daaadeb30ca832c34fb Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Thu, 15 Nov 2018 14:42:10 +0530 Subject: [PATCH 15/24] change to octet stream --- .../QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json | 2 +- .../QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json | 2 +- .../QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json | 2 +- .../QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json | 2 +- .../QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json | 2 +- .../QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json | 2 +- .../QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json | 2 +- .../QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json | 2 +- .../QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json index ac17a06b040c..9071a61bfa23 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", "environment": "Test" diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json index d8ac5cf786a9..4d624f380270 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json index 2b7f17e3d84f..926aacda147a 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json index 03ffcaa9d7a1..ff665ba449bb 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json index 1769fd26215e..a4e9cbba0cb3 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}", "operationId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json index a2442b4c773a..f90fb8dd9c11 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json index 5f6057b39212..703472ce86be 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}", "wordAlterations": { "wordAlterations": [ diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json index a2fcd4e250f0..b4f8b96202ce 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}", "keyType": "PrimaryKey" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json index 7217c27d2591..9ebf29e5885d 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/json", + "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", "updateKb": { From a8b19764c8d5e9d093bd8a617e98eaaa777050cd Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Thu, 15 Nov 2018 14:58:46 +0530 Subject: [PATCH 16/24] add consume/produces --- .../QnAMaker/stable/v4.0/QnAMaker.json | 78 +++++++++++++++++++ .../v4.0/examples/SuccessfulDownloadKb.json | 2 +- .../v4.0/examples/SuccessfulGetAlts.json | 2 +- .../v4.0/examples/SuccessfulGetEpKeys.json | 2 +- .../stable/v4.0/examples/SuccessfulGetKb.json | 2 +- .../v4.0/examples/SuccessfulGetOps.json | 2 +- .../v4.0/examples/SuccessfulKbsResponse.json | 2 +- .../v4.0/examples/SuccessfulSetAlts.json | 2 +- .../v4.0/examples/SuccessfulSetEpKeys.json | 2 +- .../stable/v4.0/examples/SuccessfulUpdKb.json | 2 +- 10 files changed, 87 insertions(+), 9 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 8a406ec9c585..7da33c76c92c 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -32,6 +32,12 @@ "summary": "Gets endpoint keys for an endpoint", "operationId": "Get Endpoint Keys", "parameters": [], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "response with endpoint info in it.", @@ -66,6 +72,12 @@ "$ref": "#/parameters/KeyType" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "Details of the endpoint keys generated.", @@ -96,6 +108,12 @@ "summary": "Download alterations from runtime.", "operationId": "Download Alterations", "parameters": [], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "Alterations data.", @@ -128,6 +146,12 @@ "$ref": "#/parameters/WordAlterations" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "204": { "description": "HTTP 204 No Content." @@ -154,6 +178,12 @@ "summary": "Gets all knowledgebases for a user.", "operationId": "Get Knowledgebases for user", "parameters": [], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "Collection of knowlegebases.", @@ -188,6 +218,12 @@ "$ref": "#/parameters/OperationId" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "Details of the long running operation.", @@ -228,6 +264,12 @@ "$ref": "#/parameters/KbId" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "Details of the knowledgebase.", @@ -260,6 +302,12 @@ "$ref": "#/parameters/KbId" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "204": { "description": "HTTP 204 No content." @@ -288,6 +336,12 @@ "$ref": "#/parameters/KbId" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "204": { "description": "HTTP 204 No content." @@ -319,6 +373,12 @@ "$ref": "#/parameters/ReplaceKb" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "204": { "description": "HTTP 204 No content." @@ -350,6 +410,12 @@ "$ref": "#/parameters/UpdateKb" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "202": { "description": "Details of the asynchronous operation.", @@ -390,6 +456,12 @@ "$ref": "#/parameters/CreateKbPayload" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "202": { "description": "Details of the asynchronous operation.", @@ -427,6 +499,12 @@ "$ref": "#/parameters/Environment" } ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "Collection of all Q-A in the knowledgebase.", diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json index 9071a61bfa23..ac17a06b040c 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulDownloadKb.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", "environment": "Test" diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json index 4d624f380270..d8ac5cf786a9 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetAlts.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json index 926aacda147a..2b7f17e3d84f 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetEpKeys.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json index ff665ba449bb..03ffcaa9d7a1 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetKb.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json index a4e9cbba0cb3..1769fd26215e 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulGetOps.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "operationId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json index f90fb8dd9c11..a2442b4c773a 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulKbsResponse.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json index 703472ce86be..5f6057b39212 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "wordAlterations": { "wordAlterations": [ diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json index b4f8b96202ce..a2fcd4e250f0 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetEpKeys.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "keyType": "PrimaryKey" }, diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json index 9ebf29e5885d..7217c27d2591 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulUpdKb.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "Content-Type": "application/octet-stream", + "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", "updateKb": { From c8295f91b10bd7a2248438aa32ae6bbb8620ef14 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Thu, 15 Nov 2018 15:07:23 +0530 Subject: [PATCH 17/24] remove response body --- .../QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json | 1 - .../QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json | 1 - 2 files changed, 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json index 6ce8e4abc1bc..3bb3df661bf1 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulPubKb.json @@ -7,7 +7,6 @@ }, "responses": { "204": { - "body": {} } } } \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json index 4f9b2c55a31b..ae1d74cf245e 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulRepKb.json @@ -25,7 +25,6 @@ }, "responses": { "204": { - "body": {} } } } \ No newline at end of file From 5c3519e663b4fe7b6589bb9a7589d7e87543c8e0 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Thu, 15 Nov 2018 15:19:45 +0530 Subject: [PATCH 18/24] fix set alt example --- .../QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json index 5f6057b39212..2c3387e88fc6 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/examples/SuccessfulSetAlts.json @@ -28,8 +28,6 @@ }, "responses": { "204": { - "headers": {}, - "body": {} } } } \ No newline at end of file From aa61ca4886beac249ab1f15b8f5874ca95428eb1 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 16 Nov 2018 12:19:23 +0530 Subject: [PATCH 19/24] Update Operation Ids --- .../QnAMaker/stable/v4.0/QnAMaker.json | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 7da33c76c92c..4c4b01840836 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -30,7 +30,7 @@ "/endpointkeys": { "get": { "summary": "Gets endpoint keys for an endpoint", - "operationId": "Get Endpoint Keys", + "operationId": "Endpoint_GetKeys", "parameters": [], "consumes": [ "application/json" @@ -66,7 +66,7 @@ "EndpointKeys" ], "summary": "Re-generates an endpoint key.", - "operationId": "Refresh Endpoint Keys", + "operationId": "Endpoint_RefreshKeys", "parameters": [ { "$ref": "#/parameters/KeyType" @@ -106,7 +106,7 @@ "Alterations" ], "summary": "Download alterations from runtime.", - "operationId": "Download Alterations", + "operationId": "Alterations_Get", "parameters": [], "consumes": [ "application/json" @@ -140,7 +140,7 @@ "Alterations" ], "summary": "Replace alterations data.", - "operationId": "Replace Alterations", + "operationId": "Alterations_Replace", "parameters": [ { "$ref": "#/parameters/WordAlterations" @@ -176,7 +176,7 @@ "Knowledgebases" ], "summary": "Gets all knowledgebases for a user.", - "operationId": "Get Knowledgebases for user", + "operationId": "Knowledgebase_ListAll", "parameters": [], "consumes": [ "application/json" @@ -212,7 +212,7 @@ "Operations" ], "summary": "Gets details of a specific long running operation.", - "operationId": "Get Operation Details", + "operationId": "Operation_Get", "parameters": [ { "$ref": "#/parameters/OperationId" @@ -258,7 +258,7 @@ "Knowledgebases" ], "summary": "Gets details of a specific knowledgebase.", - "operationId": "Get Knowledgebase Details", + "operationId": "Knowledgebase_GetDetails", "parameters": [ { "$ref": "#/parameters/KbId" @@ -296,7 +296,7 @@ "Knowledgebases" ], "summary": "Deletes the knowledgebase and all its data.", - "operationId": "Delete Knowledgebase", + "operationId": "Knowledgebase_Delete", "parameters": [ { "$ref": "#/parameters/KbId" @@ -330,7 +330,7 @@ "Knowledgebases" ], "summary": "Publishes all changes in test index of a knowledgebase to its prod index.", - "operationId": "Publish Knowledgebase", + "operationId": "Knowledgebase_Publish", "parameters": [ { "$ref": "#/parameters/KbId" @@ -364,7 +364,7 @@ "Knowledgebases" ], "summary": "Replace knowledgebase contents.", - "operationId": "Replace Knowledgebase", + "operationId": "Knowledgebase_Replace", "parameters": [ { "$ref": "#/parameters/KbId" @@ -401,7 +401,7 @@ "Knowledgebases" ], "summary": "Asynchronous operation to modify a knowledgebase.", - "operationId": "Update Knowledgebase", + "operationId": "Knowledgebase_Update", "parameters": [ { "$ref": "#/parameters/KbId" @@ -450,7 +450,7 @@ "Knowledgebases" ], "summary": "Asynchronous operation to create a new knowledgebase.", - "operationId": "Create Knowledgebase", + "operationId": "Knowledgebase_Create", "parameters": [ { "$ref": "#/parameters/CreateKbPayload" @@ -490,7 +490,7 @@ "Knowledgebases" ], "summary": "Download the knowledgebase.", - "operationId": "Download Knowledgebase", + "operationId": "Knowledgebase_Download", "parameters": [ { "$ref": "#/parameters/KbId" From 4d8e6ace6b3b986392a8170091268a4b28237009 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 16 Nov 2018 12:32:43 +0530 Subject: [PATCH 20/24] Fix case of description --- .../data-plane/QnAMaker/stable/v4.0/QnAMaker.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 4c4b01840836..017d68212d59 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -40,7 +40,7 @@ ], "responses": { "200": { - "description": "response with endpoint info in it.", + "description": "Response with endpoint info in it.", "schema": { "$ref": "#/definitions/EndpointKeysDTO" }, @@ -702,7 +702,7 @@ "properties": { "qnaList": { "type": "array", - "description": "list of QNA to be added to the index. Ids are generated by the service and should be omitted.", + "description": "List of QNA to be added to the index. Ids are generated by the service and should be omitted.", "items": { "$ref": "#/definitions/QnADTO" } @@ -1259,7 +1259,7 @@ "in": "path", "required": true, "x-nullable": false, - "description": "type of Key", + "description": "Type of Key", "x-ms-parameter-location": "method" }, "Endpoint": { From 8e3f6e722266baa431ac55b8c178fbc6f6067dbc Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 16 Nov 2018 13:49:53 +0530 Subject: [PATCH 21/24] Enums as strings --- .../QnAMaker/stable/v4.0/QnAMaker.json | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 017d68212d59..0e0caac732f3 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -212,7 +212,7 @@ "Operations" ], "summary": "Gets details of a specific long running operation.", - "operationId": "Operation_Get", + "operationId": "Operations_GetDetails", "parameters": [ { "$ref": "#/parameters/OperationId" @@ -728,6 +728,10 @@ "KnowledgebaseEnvironment": { "type": "string", "description": "Enumeration of knowledgebase environments.", + "x-ms-enum": { + "name": "KnowledgebaseEnvironmentType", + "modelAsString": true + }, "x-enumNames": [ "Prod", "Test" @@ -947,6 +951,10 @@ "ErrorCode": { "type": "string", "description": "Human readable error code.", + "x-ms-enum": { + "name": "ErrorCodeType", + "modelAsString": true + }, "x-enumNames": [ "BadArgument", "Forbidden", @@ -1033,6 +1041,10 @@ "OperationState": { "type": "string", "description": "Enumeration of operation states.", + "x-ms-enum": { + "name": "OperationStateType", + "modelAsString": true + }, "x-enumNames": [ "Failed", "NotStarted", @@ -1044,11 +1056,7 @@ "NotStarted", "Running", "Succeeded" - ], - "x-ms-enum": { - "name": "OperationState", - "modelAsString": false - } + ] }, "KnowledgebasesDTO": { "type": "object", @@ -1185,6 +1193,10 @@ }, "x-nullable": false, "description": "Specifies whether environment is Test or Prod.", + "x-ms-enum": { + "name": "EnvironmentType", + "modelAsString": true + }, "enum": [ "Prod", "Test" From 74a8aad67a395af739af66dd6550936534b04ca1 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 16 Nov 2018 16:07:22 +0530 Subject: [PATCH 22/24] Adding md files for other langs --- .../data-plane/QnAMaker/readme.nodejs.md | 14 ++++++++++ .../data-plane/QnAMaker/readme.ruby.md | 27 +++++++++++++++++++ .../data-plane/QnAMaker/readme.typescript.md | 12 +++++++++ 3 files changed, 53 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/readme.nodejs.md create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md create mode 100644 specification/cognitiveservices/data-plane/QnAMaker/readme.typescript.md diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.nodejs.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.nodejs.md new file mode 100644 index 000000000000..c5b34edc925f --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.nodejs.md @@ -0,0 +1,14 @@ +## Node.js + +These settings apply only when `--nodejs` is specified on the command line. +Please also specify `--node-sdks-folder=`. + +``` yaml $(nodejs) +nodejs: + package-name: azure-cognitiveservices-qnamaker + output-folder: $(node-sdks-folder)/lib/services/cognitiveServices/qnamaker + azure-arm: false + generate-license-txt: true + generate-package-json: true + generate-readme-md: true +``` diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md new file mode 100644 index 000000000000..76bad815e8b2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md @@ -0,0 +1,27 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +``` yaml +package-name: azure_cognitiveservices_qnamaker +package-version: "0.4.0" +azure-arm: true +``` + +### Ruby multi-api + +``` yaml $(ruby) && $(multiapi) +batch: + - tag: release_4_0 +``` + +### Tag: release_4_0 and ruby + +These settings apply only when `--tag=release_4_0 --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +``` yaml $(tag) == 'release_4_0' && $(ruby) +namespace: "Azure::CognitiveServices::QnAMaker::V4_0" +output-folder: $(ruby-sdks-folder)/data/azure_cognitiveservices_qnamaker/lib +title: "QnAMakerClient" +``` diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.typescript.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.typescript.md new file mode 100644 index 000000000000..5639b97a3794 --- /dev/null +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.typescript.md @@ -0,0 +1,12 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +typescript: + package-name: "@azure/cognitiveservices-qnamaker" + output-folder: "$(typescript-sdks-folder)/packages/@azure/cognitiveservices-qnamaker" + azure-arm: false + generate-metadata: true +``` From ee45ed4c8103d333ff4cafe17c4754de0252a763 Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Fri, 16 Nov 2018 16:25:01 +0530 Subject: [PATCH 23/24] Update Ruby readme --- .../cognitiveservices/data-plane/QnAMaker/readme.ruby.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md index 76bad815e8b2..235b78174402 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md @@ -4,7 +4,7 @@ These settings apply only when `--ruby` is specified on the command line. ``` yaml package-name: azure_cognitiveservices_qnamaker -package-version: "0.4.0" +package-version: "0.16.0" azure-arm: true ``` @@ -21,7 +21,6 @@ These settings apply only when `--tag=release_4_0 --ruby` is specified on the co Please also specify `--ruby-sdks-folder=`. ``` yaml $(tag) == 'release_4_0' && $(ruby) -namespace: "Azure::CognitiveServices::QnAMaker::V4_0" +namespace: "Azure::CognitiveServices::QnAMaker::V4" output-folder: $(ruby-sdks-folder)/data/azure_cognitiveservices_qnamaker/lib -title: "QnAMakerClient" -``` +``` \ No newline at end of file From 6d39886ed6724f110fc68811e7c23a5ef0ee971c Mon Sep 17 00:00:00 2001 From: Anand <44665487+bingisbestest@users.noreply.github.com> Date: Sun, 18 Nov 2018 14:20:30 +0530 Subject: [PATCH 24/24] remove x-enumNames --- .../QnAMaker/stable/v4.0/QnAMaker.json | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 0e0caac732f3..e64b89fcfb7e 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -732,10 +732,6 @@ "name": "KnowledgebaseEnvironmentType", "modelAsString": true }, - "x-enumNames": [ - "Prod", - "Test" - ], "enum": [ "Prod", "Test" @@ -955,22 +951,6 @@ "name": "ErrorCodeType", "modelAsString": true }, - "x-enumNames": [ - "BadArgument", - "Forbidden", - "NotFound", - "KbNotFound", - "Unauthorized", - "Unspecified", - "EndpointKeysError", - "QuotaExceeded", - "QnaRuntimeError", - "SKULimitExceeded", - "OperationNotFound", - "ServiceError", - "ValidationFailure", - "ExtractionFailure" - ], "enum": [ "BadArgument", "Forbidden", @@ -1045,12 +1025,6 @@ "name": "OperationStateType", "modelAsString": true }, - "x-enumNames": [ - "Failed", - "NotStarted", - "Running", - "Succeeded" - ], "enum": [ "Failed", "NotStarted",