microsoft / microsoft/typespec

[Design]: Determine how to model raw bytes and base64-encoded data in multipart scenarios

Open
#2,703 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.