-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sbelkadi/FER-3743
- Loading branch information
Showing
2,263 changed files
with
32,757 additions
and
54,279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
fern/pages/api-definition/fern-definition/endpoints/bytes.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Binary Data and Files | ||
subtitle: Use the `bytes` type to handle binary data in your API | ||
--- | ||
|
||
<Note> | ||
The `bytes` type allows you to handle binary data in both requests and responses. | ||
</Note> | ||
|
||
## Sending bytes | ||
|
||
If your API needs to send a stream of bytes (i.e. typical for assets like audio, images and other files) then | ||
you can use the `bytes` type in the Fern Definition to model this. | ||
|
||
```yml audio.yml | ||
service: | ||
base-path: /audio | ||
endpoints: | ||
upload: | ||
display-name: Upload audio | ||
method: POST | ||
path: /upload | ||
content-type: application/octet-stream | ||
request: | ||
type: bytes | ||
docs: The bytes of the MP3 file that you would like to upload | ||
``` | ||
## Receiving bytes | ||
On the other hand, if your API is returning a stream of bytes, then you can leverage the `bytes` type as a response. | ||
|
||
```yml textToSpeech.yml | ||
service: | ||
base-path: /tts | ||
endpoints: | ||
upload: | ||
display-name: Upload audio | ||
method: POST | ||
path: "" | ||
request: | ||
name: TTSRequest | ||
body: | ||
properties: | ||
text: | ||
type: string | ||
docs: The text that you want converted to speach. | ||
response: | ||
type: bytes | ||
docs: The bytes of the audio file. | ||
``` | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## 0.45.3 | ||
**`(fix):`** Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. | ||
**`(fix):`** Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 0.45.4-rc1 | ||
**`(chore):`** Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 0.45.4 | ||
**`(fix):`** Defaults are no longer set on datetimes when converting to docs shapes. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 0.46.0 | ||
**`(internal):`** No changes; promote `0.46.0-rc1` release candidate to minor version. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 0.34.0 | ||
**`(feat):`** Add support for sending the `User-Agent` header on every request. Go packages are uniquely identified by their full module path, so the `User-Agent` header is generated in the `<module>/<version>` format, e.g. | ||
``` User-Agent: github.com/acme/acme-go/1.0.0 ``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 1.3.0 | ||
**`(chore):`** Bump IR version to latest (v53) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## 2.4.0 | ||
**`(feat):`** We now support overriding sdk package prefixes by adding a "package-prefix" key under the java-sdk generator | ||
configuration. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 2.7.0 | ||
**`(feat):`** Apply Content-Type header from endpoint definition in SDK generator. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 1.3.0 | ||
**`(chore):`** Bump IR version to latest (v53) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.