- This PR is implementation for API design https://github.com/Azure/typespec-azure/pull/987, mainly for 1 and 2 format. Format 3 will be implemented in another PR.
Show changes
### `@azure-tools/typespec-client-generator-core` - _feature_ [✏️](https://github.com/Azure/typespec-azure/edit/multipart-implementation/.chronus/changes/multipart-implementation-2024-5-28-10-50-5.md?pr=/Azure/typespec-azure/pull/1090)
> Support model format of `@multipartBody`
Context: Typespec supports 3 kinds of format to define multipart:
op upload( @header
content-type
: "multipart/form-data", @body body: { basic: string, headShots: bytes[], } ): void;op upload( @header,
headShots: HttpPart<bytes[]>
}
): void;
content-type
: "multipart/form-data", @multipartBody body: { fullName: HttpPartop upload( @header
content-type
: "multipart/form-data", @multipartBody body: [ // single HttpPart<string, #{ name: "fullName" }>, HttpPart<bytes[], #{ name: "headShots" }>, ] ): void;