From 815a7a6c7936d317ee920d46c24a4d54ce6cfb08 Mon Sep 17 00:00:00 2001 From: KATTA-00 Date: Thu, 8 Aug 2024 11:10:56 +0530 Subject: [PATCH 1/2] Update response content type in /files/{file_id}/content endpoint --- docs/spec/openapi.yaml | 4 ++-- docs/spec/sanitations.md | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/spec/openapi.yaml b/docs/spec/openapi.yaml index 8775548..7380865 100644 --- a/docs/spec/openapi.yaml +++ b/docs/spec/openapi.yaml @@ -1694,7 +1694,7 @@ paths: "200": description: OK content: - application/json: + application/octet-stream: schema: type: string x-oaiMeta: @@ -14273,4 +14273,4 @@ x-oaiMeta: path: create - type: object key: CreateCompletionResponse - path: object + path: object \ No newline at end of file diff --git a/docs/spec/sanitations.md b/docs/spec/sanitations.md index e2439cc..2b65f9a 100644 --- a/docs/spec/sanitations.md +++ b/docs/spec/sanitations.md @@ -37,6 +37,13 @@ This document records the sanitation done on top of the official OpenAPI specifi - **Reasons**: The response does not include the code, message, and param, causing an error of missing required fields when converting. +4. **Changed the responce content type in /files/{file_id}/content end point** + - **Original**: The response content type of the /files/{file_id}/content endpoint was originally application/json. + + - **Updated**: The content type has been changed to application/octet-stream. + + - **Reasons**: The server's actual response content type was application/octet-stream. + ## OpenAPI cli command The following command was used to generate the Ballerina client from the OpenAPI specification. The command should be executed from the repository root directory. @@ -44,4 +51,4 @@ The following command was used to generate the Ballerina client from the OpenAPI ```bash bal openapi -i docs/spec/openapi.yaml --mode client --license docs/license.txt -o ballerina --tags 'Fine-tuning','Files','Models' ``` -Note: The license year is hardcoded to 2024, change if necessary. +Note: The license year is hardcoded to 2024, change if necessary. \ No newline at end of file From 1bb54e0e3b40b09e79fc028ded49c637e99a4fe3 Mon Sep 17 00:00:00 2001 From: Kanishka Gunawardana <83855665+KATTA-00@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:20:44 +0530 Subject: [PATCH 2/2] Update docs/spec/sanitations.md Co-authored-by: Nipuna Ransinghe --- docs/spec/sanitations.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/spec/sanitations.md b/docs/spec/sanitations.md index 2b65f9a..dcac153 100644 --- a/docs/spec/sanitations.md +++ b/docs/spec/sanitations.md @@ -37,12 +37,12 @@ This document records the sanitation done on top of the official OpenAPI specifi - **Reasons**: The response does not include the code, message, and param, causing an error of missing required fields when converting. -4. **Changed the responce content type in /files/{file_id}/content end point** - - **Original**: The response content type of the /files/{file_id}/content endpoint was originally application/json. +4. **Changed the response content type in `/files/{file_id}/content` endpoint** + - **Original**: The response content type of the `/files/{file_id}/content` endpoint was originally `application/json`. - - **Updated**: The content type has been changed to application/octet-stream. + - **Updated**: The content type has been changed to `application/octet-stream`. - - **Reasons**: The server's actual response content type was application/octet-stream. + - **Reasons**: The server's actual response content type was `application/octet-stream`. ## OpenAPI cli command