openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 27.5 kB
JSON
{"openapi":"3.0.0","info":{"description":"An API for QnAMaker Service","title":"QnAMaker Client","version":"4.0","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"cognitiveservices-QnAMaker","x-tags":["Azure","Microsoft"]},"security":[{"apim_key":[]}],"paths":{"/alterations":{"get":{"operationId":"Alterations_Get","responses":{"200":{"description":"Alterations data.","x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WordAlterationsDTO"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Download alterations from runtime.","tags":["Alterations"]},"put":{"operationId":"Alterations_Replace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WordAlterationsDTO"}}},"description":"New alterations data.","required":true,"x-ms-parameter-location":"method","x-nullable":true},"responses":{"204":{"description":"HTTP 204 No Content."},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Replace alterations data.","tags":["Alterations"]}},"/endpointSettings":{"get":{"operationId":"EndpointSettings_GetSettings","responses":{"200":{"description":"Response with endpoint settings info in it.","x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointSettingsDTO"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Gets endpoint settings for an endpoint."},"patch":{"operationId":"EndpointSettings_UpdateSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointSettingsDTO"}}},"description":"Post body of the request.","required":true,"x-ms-parameter-location":"method","x-nullable":true},"responses":{"200":{"description":"Response with endpointSettings update status.","content":{"application/json":{"schema":{"type":"string"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Updates endpoint settings for an endpoint.","tags":["EndpointKeys"]}},"/endpointkeys":{"get":{"operationId":"EndpointKeys_GetKeys","responses":{"200":{"description":"Response with endpoint info in it.","x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointKeysDTO"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Gets endpoint keys for an endpoint"}},"/endpointkeys/{keyType}":{"patch":{"operationId":"EndpointKeys_RefreshKeys","parameters":[{"$ref":"#/components/parameters/KeyType"}],"responses":{"200":{"description":"Details of the endpoint keys generated.","x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointKeysDTO"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Re-generates an endpoint key.","tags":["EndpointKeys"]}},"/knowledgebases":{"get":{"operationId":"Knowledgebase_ListAll","responses":{"200":{"description":"Collection of knowledgebases.","x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgebasesDTO"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Gets all knowledgebases for a user.","tags":["Knowledgebases"]}},"/knowledgebases/create":{"post":{"operationId":"Knowledgebase_Create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKbDTO"}}},"description":"Post body of the request.","required":true,"x-ms-parameter-location":"method","x-nullable":true},"responses":{"202":{"description":"Details of the asynchronous operation.","x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Asynchronous operation to create a new knowledgebase.","tags":["Knowledgebases"]}},"/knowledgebases/{kbId}":{"delete":{"operationId":"Knowledgebase_Delete","parameters":[{"$ref":"#/components/parameters/KbId"}],"responses":{"204":{"description":"HTTP 204 No content."},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Deletes the knowledgebase and all its data.","tags":["Knowledgebases"]},"get":{"operationId":"Knowledgebase_GetDetails","parameters":[{"$ref":"#/components/parameters/KbId"}],"responses":{"200":{"description":"Details of the knowledgebase.","x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgebaseDTO"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Gets details of a specific knowledgebase.","tags":["Knowledgebases"]},"patch":{"operationId":"Knowledgebase_Update","parameters":[{"$ref":"#/components/parameters/KbId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKbOperationDTO"}}},"description":"Post body of the request.","required":true,"x-ms-parameter-location":"method","x-nullable":true},"responses":{"202":{"description":"Details of the asynchronous operation.","headers":{"Location":{"description":"Relative URI to the target location of the asynchronous operation. Client should poll this resource to get status of the operation.","schema":{"type":"string"}}},"x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Asynchronous operation to modify a knowledgebase.","tags":["Knowledgebases"]},"post":{"operationId":"Knowledgebase_Publish","parameters":[{"$ref":"#/components/parameters/KbId"}],"responses":{"204":{"description":"HTTP 204 No content."},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Publishes all changes in test index of a knowledgebase to its prod index.","tags":["Knowledgebases"]},"put":{"operationId":"Knowledgebase_Replace","parameters":[{"$ref":"#/components/parameters/KbId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceKbDTO"}}},"description":"An instance of ReplaceKbDTO which contains list of qnas to be uploaded","required":true,"x-ms-parameter-location":"method","x-nullable":true},"responses":{"204":{"description":"HTTP 204 No content."},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Replace knowledgebase contents.","tags":["Knowledgebases"]}},"/knowledgebases/{kbId}/{environment}/qna":{"get":{"operationId":"Knowledgebase_Download","parameters":[{"$ref":"#/components/parameters/KbId"},{"$ref":"#/components/parameters/Environment"}],"responses":{"200":{"description":"Collection of all Q-A in the knowledgebase.","x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QnADocumentsDTO"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Download the knowledgebase.","tags":["Knowledgebases"]}},"/operations/{operationId}":{"get":{"operationId":"Operations_GetDetails","parameters":[{"$ref":"#/components/parameters/OperationId"}],"responses":{"200":{"description":"Details of the long running operation.","headers":{"RetryAfter":{"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.","schema":{"type":"integer"}}},"x-nullable":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"},"examples":{"Successful query":{"$ref":"#/components/examples/Successful_query"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Gets details of a specific long running operation.","tags":["Operations"]}}},"servers":[{"url":"https://azure.local"},{"url":"{Endpoint}/qnamaker/v4.0","variables":{"Endpoint":{"description":"Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).","x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"default":"none"}}}],"components":{"examples":{"Successful_query":{"value":{"createdTimestamp":"2018-03-19T07:38:46Z","lastActionTimestamp":"2018-03-19T07:39:29Z","operationId":"03a4f4ce-30a6-4ec6-b436-02bcdf6153e1","operationState":"Succeeded","resourceLocation":"https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/knowledgebases/9d091697-fb8c-4ed5-9ac0-35bf8273bfff","userId":"86bb8390-56c0-42c2-9f81-3de161981191"}}},"parameters":{"Endpoint":{"description":"Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).","in":"path","name":"Endpoint","required":true,"x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"schema":{"type":"string"}},"Environment":{"description":"Specifies whether environment is Test or Prod.","in":"path","name":"environment","required":true,"x-ms-enum":{"modelAsString":true,"name":"EnvironmentType"},"x-ms-parameter-location":"method","x-nullable":false,"schema":{"type":"string","enum":["Prod","Test"]},"examples":{"Successful query":{"value":"Test"}}},"KbId":{"description":"Knowledgebase id.","in":"path","name":"kbId","required":true,"x-ms-parameter-location":"method","x-nullable":false,"schema":{"type":"string"},"examples":{"Successful query":{"value":"9d091697-fb8c-4ed5-9ac0-35bf8273bfff"}}},"KeyType":{"description":"Type of Key","in":"path","name":"keyType","required":true,"x-ms-parameter-location":"method","x-nullable":false,"schema":{"type":"string"},"examples":{"Successful query":{"value":"PrimaryKey"}}},"OperationId":{"description":"Operation id.","in":"path","name":"operationId","required":true,"x-ms-parameter-location":"method","x-nullable":false,"schema":{"type":"string"},"examples":{"Successful query":{"value":"03a4f4ce-30a6-4ec6-b436-02bcdf6153e1"}}}},"securitySchemes":{"apim_key":{"in":"header","name":"Ocp-Apim-Subscription-Key","type":"apiKey"}},"schemas":{"ActiveLearningSettingsDTO":{"additionalProperties":false,"description":"Active Learning settings of the endpoint.","properties":{"enable":{"description":"True/False string providing Active Learning","type":"string"}},"type":"object"},"AlterationsDTO":{"additionalProperties":false,"description":"Collection of words that are synonyms.","properties":{"alterations":{"description":"Words that are synonymous with each other.","items":{"type":"string"},"maxLength":20,"minLength":1,"type":"array"}},"required":["alterations"],"type":"object"},"ContextDTO":{"description":"Context associated with Qna.","properties":{"isContextOnly":{"description":"To mark if a prompt is relevant only with a previous question or not.\ntrue - Do not include this QnA as search result for queries without context\nfalse - ignores context and includes this QnA in search result","type":"boolean"},"prompts":{"description":"List of prompts associated with the answer.","items":{"$ref":"#/components/schemas/PromptDTO"},"maxItems":20,"type":"array"}},"type":"object"},"CreateKbDTO":{"additionalProperties":false,"description":"Post body schema for CreateKb operation.","properties":{"defaultAnswerUsedForExtraction":{"description":"Text string to be used as the answer in any Q-A which has no extracted answer from the document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True.","maxLength":300,"minLength":1,"type":"string"},"enableHierarchicalExtraction":{"description":"Enable hierarchical extraction of Q-A from files and urls. Value to be considered False if this field is not present.","type":"boolean"},"files":{"description":"List of files from which to Extract Q-A.","items":{"$ref":"#/components/schemas/FileDTO"},"maxLength":10,"type":"array"},"language":{"description":"Language of the knowledgebase.","maxLength":100,"minLength":1,"type":"string"},"name":{"description":"Friendly name for the knowledgebase.","maxLength":100,"minLength":1,"type":"string"},"qnaList":{"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":"#/components/schemas/QnADTO"},"maxLength":1000,"type":"array"},"urls":{"description":"List of URLs to be used for extracting Q-A.","items":{"type":"string"},"maxLength":10,"type":"array"}},"required":["name"],"type":"object"},"CreateKbInputDTO":{"additionalProperties":false,"description":"Input to create KB.","properties":{"files":{"description":"List of files to be added to knowledgebase.","items":{"$ref":"#/components/schemas/FileDTO"},"maxLength":10,"type":"array"},"qnaList":{"description":"List of QNA to be added to the index. Ids are generated by the service and should be omitted.","items":{"$ref":"#/components/schemas/QnADTO"},"type":"array"},"urls":{"description":"List of URLs to be added to knowledgebase.","items":{"type":"string"},"maxLength":10,"type":"array"}},"type":"object"},"DeleteKbContentsDTO":{"additionalProperties":false,"description":"PATCH body schema of Delete Operation in UpdateKb","properties":{"ids":{"description":"List of Qna Ids to be deleted","items":{"format":"int32","type":"integer"},"type":"array"},"sources":{"description":"List of sources to be deleted from knowledgebase.","items":{"type":"string"},"maxLength":300,"minLength":1,"type":"array"}},"type":"object"},"EndpointKeysDTO":{"additionalProperties":false,"description":"Schema for EndpointKeys generate/refresh operations.","properties":{"installedVersion":{"description":"Current version of runtime.","type":"string"},"language":{"description":"Language setting of runtime.","type":"string"},"lastStableVersion":{"description":"Latest version of runtime.","type":"string"},"primaryEndpointKey":{"description":"Primary Access Key.","type":"string"},"secondaryEndpointKey":{"description":"Secondary Access Key.","type":"string"}},"type":"object"},"EndpointSettingsDTO":{"additionalProperties":false,"description":"Endpoint settings.","properties":{"activeLearning":{"allOf":[{"$ref":"#/components/schemas/ActiveLearningSettingsDTO"}],"description":"Active Learning settings of the endpoint."}},"type":"object"},"Error":{"additionalProperties":false,"description":"The error object. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"details":{"description":"An array of details about specific errors that led to this reported error.","items":{"$ref":"#/components/schemas/Error"},"type":"array"},"innerError":{"$ref":"#/components/schemas/InnerErrorModel"},"message":{"description":"A human-readable representation of the error.","type":"string"},"target":{"description":"The target of the error.","type":"string"}},"required":["code"],"type":"object"},"ErrorCode":{"description":"Human readable error code.","enum":["BadArgument","Forbidden","NotFound","KbNotFound","Unauthorized","Unspecified","EndpointKeysError","QuotaExceeded","QnaRuntimeError","SKULimitExceeded","OperationNotFound","ServiceError","ValidationFailure","ExtractionFailure"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"ErrorCodeType"}},"ErrorResponse":{"additionalProperties":false,"description":"Error response. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.","properties":{"error":{"allOf":[{"$ref":"#/components/schemas/Error"}],"description":"The error object."}},"type":"object"},"FileDTO":{"additionalProperties":false,"description":"DTO to hold details of uploaded files.","properties":{"fileName":{"description":"File name. Supported file types are \".tsv\", \".pdf\", \".txt\", \".docx\", \".xlsx\".","maxLength":200,"minLength":1,"type":"string"},"fileUri":{"description":"Public URI of the file.","type":"string"}},"required":["fileName","fileUri"],"type":"object"},"InnerErrorModel":{"additionalProperties":false,"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.","properties":{"code":{"description":"A more specific error code than was provided by the containing error.","type":"string"},"innerError":{"$ref":"#/components/schemas/InnerErrorModel"}},"type":"object"},"KnowledgebaseDTO":{"additionalProperties":false,"description":"Response schema for CreateKb operation.","properties":{"hostName":{"description":"URL host name at which the knowledgebase is hosted.","type":"string"},"id":{"description":"Unique id that identifies a knowledgebase.","type":"string"},"lastAccessedTimestamp":{"description":"Time stamp at which the knowledgebase was last accessed (UTC).","type":"string"},"lastChangedTimestamp":{"description":"Time stamp at which the knowledgebase was last modified (UTC).","type":"string"},"lastPublishedTimestamp":{"description":"Time stamp at which the knowledgebase was last published (UTC).","type":"string"},"name":{"description":"Friendly name of the knowledgebase.","type":"string"},"sources":{"description":"Custom sources from which Q-A were extracted or explicitly added to the knowledgebase.","items":{"type":"string"},"type":"array"},"urls":{"description":"URL sources from which Q-A were extracted and added to the knowledgebase.","items":{"type":"string"},"type":"array"},"userId":{"description":"User who created / owns the knowledgebase.","type":"string"}},"type":"object"},"KnowledgebasesDTO":{"additionalProperties":false,"description":"Collection of knowledgebases owned by a user.","properties":{"knowledgebases":{"description":"Collection of knowledgebase records.","items":{"$ref":"#/components/schemas/KnowledgebaseDTO"},"type":"array"}},"type":"object"},"MetadataDTO":{"additionalProperties":false,"description":"Name - value pair of metadata.","properties":{"name":{"description":"Metadata name.","maxLength":100,"minLength":1,"type":"string"},"value":{"description":"Metadata value.","maxLength":500,"minLength":1,"type":"string"}},"required":["name","value"],"type":"object"},"Operation":{"additionalProperties":false,"description":"Record to track long running operation.","properties":{"createdTimestamp":{"description":"Timestamp when the operation was created.","type":"string"},"errorResponse":{"$ref":"#/components/schemas/ErrorResponse"},"lastActionTimestamp":{"description":"Timestamp when the current state was entered.","type":"string"},"operationId":{"description":"Operation Id.","type":"string"},"operationState":{"$ref":"#/components/schemas/OperationState"},"resourceLocation":{"description":"Relative URI to the target resource location for completed resources.","type":"string"},"userId":{"description":"User Id","type":"string"}},"type":"object"},"OperationState":{"description":"Enumeration of operation states.","enum":["Failed","NotStarted","Running","Succeeded"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"OperationStateType"}},"PromptDTO":{"description":"Prompt for an answer.","properties":{"displayOrder":{"description":"Index of the prompt - used in ordering of the prompts","format":"int32","type":"integer"},"displayText":{"description":"Text displayed to represent a follow up question prompt","maxLength":200,"type":"string"},"qna":{"allOf":[{"$ref":"#/components/schemas/QnADTO"}],"description":"QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object"},"qnaId":{"description":"Qna id corresponding to the prompt - if QnaId is present, QnADTO object is ignored.","format":"int32","type":"integer"}},"type":"object"},"QnADTO":{"additionalProperties":false,"description":"Q-A object.","properties":{"answer":{"description":"Answer text","maxLength":25000,"minLength":1,"type":"string"},"context":{"allOf":[{"$ref":"#/components/schemas/ContextDTO"}],"description":"Context of a QnA"},"id":{"description":"Unique id for the Q-A.","format":"int32","type":"integer"},"metadata":{"description":"List of metadata associated with the answer.","items":{"$ref":"#/components/schemas/MetadataDTO"},"maxLength":10,"type":"array"},"questions":{"description":"List of questions associated with the answer.","items":{"type":"string"},"maxLength":100,"minLength":1,"type":"array"},"source":{"description":"Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs","maxLength":300,"type":"string"}},"required":["answer","questions"],"type":"object"},"QnADocumentsDTO":{"additionalProperties":false,"description":"List of QnADTO","properties":{"qnaDocuments":{"description":"List of answers.","items":{"$ref":"#/components/schemas/QnADTO"},"type":"array"}},"type":"object"},"ReplaceKbDTO":{"additionalProperties":false,"description":"Post body schema for Replace KB operation.","properties":{"qnAList":{"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":"#/components/schemas/QnADTO"},"type":"array"}},"required":["qnAList"],"type":"object"},"UpdateContextDTO":{"description":"Update Body schema to represent context to be updated","properties":{"isContextOnly":{"description":"To mark if a prompt is relevant only with a previous question or not.\ntrue - Do not include this QnA as search result for queries without context\nfalse - ignores context and includes this QnA in search result","type":"boolean"},"promptsToAdd":{"description":"List of prompts to be added to the qna.","items":{"$ref":"#/components/schemas/PromptDTO"},"type":"array"},"promptsToDelete":{"description":"List of prompts associated with qna to be deleted","items":{"format":"int32","type":"integer"},"type":"array"}},"type":"object"},"UpdateKbContentsDTO":{"additionalProperties":false,"description":"PATCH body schema for Update operation in Update Kb","properties":{"name":{"description":"Friendly name for the knowledgebase.","type":"string"},"qnaList":{"description":"List of Q-A (UpdateQnaDTO) to be added to the knowledgebase.","items":{"$ref":"#/components/schemas/UpdateQnaDTO"},"type":"array"},"urls":{"description":"List of existing URLs to be refreshed. The content will be extracted again and re-indexed.","items":{"type":"string"},"maxLength":10,"type":"array"}},"type":"object"},"UpdateKbOperationDTO":{"additionalProperties":false,"description":"Contains list of QnAs to be updated","properties":{"add":{"allOf":[{"$ref":"#/components/schemas/CreateKbInputDTO"}],"description":"An instance of CreateKbInputDTO for add operation"},"defaultAnswerUsedForExtraction":{"description":"Text string to be used as the answer in any Q-A which has no extracted answer from the document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True.","maxLength":300,"minLength":1,"type":"string"},"delete":{"allOf":[{"$ref":"#/components/schemas/DeleteKbContentsDTO"}],"description":"An instance of DeleteKbContentsDTO for delete Operation"},"enableHierarchicalExtraction":{"description":"Enable hierarchical extraction of Q-A from files and urls. The value set during KB creation will be used if this field is not present.","type":"boolean"},"update":{"allOf":[{"$ref":"#/components/schemas/UpdateKbContentsDTO"}],"description":"An instance of UpdateKbContentsDTO for Update Operation"}},"type":"object"},"UpdateMetadataDTO":{"additionalProperties":false,"description":"PATCH Body schema to represent list of Metadata to be updated","properties":{"add":{"description":"List of metadata associated with answer to be added","items":{"$ref":"#/components/schemas/MetadataDTO"},"maxLength":100,"type":"array"},"delete":{"description":"List of Metadata associated with answer to be deleted","items":{"$ref":"#/components/schemas/MetadataDTO"},"maxLength":100,"type":"array"}},"type":"object"},"UpdateQnaDTO":{"additionalProperties":false,"description":"PATCH Body schema for Update Qna List","properties":{"answer":{"description":"Answer text","type":"string"},"context":{"allOf":[{"$ref":"#/components/schemas/UpdateContextDTO"}],"description":"Context associated with Qna to be updated."},"id":{"description":"Unique id for the Q-A","format":"int32","maximum":2147483647,"minimum":0,"type":"integer"},"metadata":{"allOf":[{"$ref":"#/components/schemas/UpdateMetadataDTO"}],"description":"List of metadata associated with the answer to be updated"},"questions":{"allOf":[{"$ref":"#/components/schemas/UpdateQuestionsDTO"}],"description":"List of questions associated with the answer."},"source":{"description":"Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs","maxLength":300,"type":"string"}},"type":"object"},"UpdateQuestionsDTO":{"additionalProperties":false,"description":"PATCH Body schema for Update Kb which contains list of questions to be added and deleted","properties":{"add":{"description":"List of questions to be added","items":{"type":"string"},"maxLength":100,"type":"array"},"delete":{"description":"List of questions to be deleted.","items":{"type":"string"},"maxLength":100,"type":"array"}},"type":"object"},"WordAlterationsDTO":{"additionalProperties":false,"description":"Collection of word alterations.","properties":{"wordAlterations":{"description":"Collection of word alterations.","items":{"$ref":"#/components/schemas/AlterationsDTO"},"maxLength":10000,"type":"array"}},"required":["wordAlterations"],"type":"object"}}}}