microsoft / microsoft/typespec
[Design]: Determine how to model raw bytes and base64-encoded data in multipart scenarios
Open
design:needed
triaged:core
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
- The current default is to use the content-type to determine the encoding of type `bytes`
- `application/json` -> base64 encoding
- non-json content-type -> raw encoding
Some problems with this:
- strange encoding with union content types:
```tsp
@header("content-type")
content-type: "application/json" | "application/xml";
data: bytes;
```
- how to override, for example: how to specify the content-type and encoding of a json file?
Contributor guide
Assessment
This issue has not been assessed yet.