Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update response content type in /files/{file_id}/content endpoint #6

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/spec/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ paths:
"200":
description: OK
content:
application/json:
application/octet-stream:
schema:
type: string
x-oaiMeta:
Expand Down Expand Up @@ -14273,4 +14273,4 @@ x-oaiMeta:
path: create
- type: object
key: CreateCompletionResponse
path: object
path: object
9 changes: 8 additions & 1 deletion docs/spec/sanitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,18 @@ 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 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`.

- **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.

```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.
Loading