fix [#2962](https://github.com/microsoft/typespec/issues/2962)
This commit is contained in:
Timothee Guerin 2024-03-21 20:43:39 -07:00 коммит произвёл GitHub
Родитель e0dfe6f5d0
Коммит a8f849747c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -54,12 +54,19 @@ op create(@header contentType: "multipart/form-data", images: bytes[]): void;
// Upload 2 form fields // Upload 2 form fields
op create(@header contentType: "multipart/form-data", firstName: string, lastName: string): void; op create(@header contentType: "multipart/form-data", firstName: string, lastName: string): void;
// Upload a json field // Send a json field
model Address { model Address {
street: string; street: string;
city: string; city: string;
} }
op create(@header contentType: "multipart/form-data", address: Address): void; 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. ## Custom Content-Type, boundary, etc.