Clarify multi json part docs (#3014)
fix [#2962](https://github.com/microsoft/typespec/issues/2962)
This commit is contained in:
Родитель
e0dfe6f5d0
Коммит
a8f849747c
|
@ -54,12 +54,19 @@ op create(@header contentType: "multipart/form-data", images: bytes[]): void;
|
|||
// Upload 2 form fields
|
||||
op create(@header contentType: "multipart/form-data", firstName: string, lastName: string): void;
|
||||
|
||||
// Upload a json field
|
||||
// Send a json field
|
||||
model Address {
|
||||
street: string;
|
||||
city: string;
|
||||
}
|
||||
op create(@header contentType: "multipart/form-data", address: Address): void;
|
||||
|
||||
// Send multiple fields - In this scenario each address is sent as an individual part
|
||||
model Address {
|
||||
street: string;
|
||||
city: string;
|
||||
}
|
||||
op create(@header contentType: "multipart/form-data", addresses: Address[]): void;
|
||||
```
|
||||
|
||||
## Custom Content-Type, boundary, etc.
|
||||
|
|
Загрузка…
Ссылка в новой задаче