Azure / Azure/typespec-azure

[typespec-azure-core] Add new model `MultiPartFile` with required metadata

Open
#1,380 10 comments 0 reactions 1 assignee Claimed by @msyyc View on GitHub
design:needed lib:azure-core needs-area
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

typespec/http has native model [`File`](https://github.com/microsoft/typespec/blob/2eac90cd1e33c39d9e3e32e00d00920f7f1d606a/packages/http/lib/http.tsp#L110-L114) with optional metadata `contentType` and `filename` while many azure services (e.g. Face/openai) all ask filename as required. Currently typespec author has to define the model by themselves like:
```
model FileRequiredMeta extends File {
filename: string
}
```
After discussion, most devs pretend to add the model with required metadata to make it more convenient for typespec author. What's more, SDK could add new Type in core library for this type.

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.