Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does advanced multipart support spread? #4041

Closed
msyyc opened this issue Jul 29, 2024 · 1 comment
Closed

Does advanced multipart support spread? #4041

msyyc opened this issue Jul 29, 2024 · 1 comment

Comments

@msyyc
Copy link
Contributor

msyyc commented Jul 29, 2024

According to #3046, users shall set @multipartBody explicitly for multipart, does it mean that multipart doesn't support spread? For example, will @typespec/http treat the following API as multipart API?

model MultiPartModel {
  id: HttpPart<string>;
  file: HttpPart<File>;
} 

op upload(...{...MultiPartModel, @header contentType: "multipart/form-data"})

cc @timotheeguerin @bterlson

@timotheeguerin
Copy link
Member

yeah this wasn't part of the design, we decided multipart should only work with the explicit @multipartBody decorator(why we have a separate one from @body)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants