Skip to content

Commit

Permalink
chore(docs): specify type: bytes isn't supported in a response
Browse files Browse the repository at this point in the history
  • Loading branch information
dannysheridan committed Feb 2, 2025
1 parent dda885b commit 7e369a2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ service:
## Receiving bytes
<Note>
When handling binary data in responses, use `type: file` instead of `type: bytes`. The `bytes` type is only supported in requests.
</Note>

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
Expand All @@ -46,10 +50,11 @@ service:
type: string
docs: The text that you want converted to speech.
response:
type: bytes
type: file
docs: The bytes of the audio file.
```





0 comments on commit 7e369a2

Please sign in to comment.