diff --git a/site/specs/ai-bridge.yml b/site/specs/ai-bridge.yml index fe1cfe227..8c6f5b924 100644 --- a/site/specs/ai-bridge.yml +++ b/site/specs/ai-bridge.yml @@ -442,7 +442,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/replaceProviderResponseData' + $ref: '#/components/schemas/updateProviderResponse' examples: googleEsProviderExample: $ref: '#/components/examples/googleEsProviderPutResponseExample' @@ -457,10 +457,7 @@ components: content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/googleEsProviderResponseData' - - $ref: '#/components/schemas/awsProviderResponseData' - - $ref: '#/components/schemas/cognigyProviderResponseData' + $ref: '#/components/schemas/replaceProviderResponse' examples: googleEsProviderExample: $ref: '#/components/examples/googleEsProviderPatchResponseExample' @@ -646,6 +643,64 @@ components: - links - data - errors + replaceProviderResponse: + title: Provider Response Payload + type: object + description: Response payload for provider information. + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + example: + $ref: '#/components/examples/linksExample' + nullable: true + data: + oneOf: + - $ref: '#/components/schemas/googleEsProviderResponseData' + - $ref: '#/components/schemas/googleCxProviderResponseData' + - $ref: '#/components/schemas/awsProviderResponseData' + - $ref: '#/components/schemas/cognigyProviderResponseData' + errors: + type: array + items: + $ref: '#/components/schemas/error' + example: + $ref: '#/components/examples/errorsExample' + nullable: true + required: + - links + - data + - errors + updateProviderResponse: + title: Provider Response Payload + type: object + description: Response payload for provider information. + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + example: + $ref: '#/components/examples/linksExample' + nullable: true + data: + oneOf: + - $ref: '#/components/schemas/googleEsProviderResponseData' + - $ref: '#/components/schemas/googleCxProviderResponseData' + - $ref: '#/components/schemas/awsProviderResponseData' + - $ref: '#/components/schemas/cognigyProviderResponseData' + errors: + type: array + items: + $ref: '#/components/schemas/error' + example: + $ref: '#/components/examples/errorsExample' + nullable: true + required: + - links + - data + - errors listProviderResponse: title: Provider Response Payload type: object @@ -841,7 +896,7 @@ components: $ref: '#/components/schemas/awsProviderResponse' nullable: true example: - $ref: '#/components/examples/awsProviderGetResponseExample' + $ref: '#/components/examples/awsProviderExample' cognigyProviderResponseData: title: Cognigy Provider Response Data type: object @@ -2453,7 +2508,7 @@ components: botUrl: http://cognigy-bot-url errors: [] cognigyProviderPostResponseExample: - summary: An example of a Cognigy provider + summary: An example of a Cognigy provider reponse value: links: - href: /provider