-
Notifications
You must be signed in to change notification settings - Fork 230
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
Multipart explicit parts #3342
Multipart explicit parts #3342
Conversation
All changed packages have been documented.
Show changes
|
…ture/multipart-v2
I do not but this doesn't affect the existing implicit multipart (if it did it would be a bug) typespec autorest PR Azure/typespec-azure#902 |
…ture/multipart-v2
Add support for microsoft/typespec#3342 in autorest emitter
resolve #3046 Playground
Add the following:
@multipartBody
decoratorFile
typeHttpPart<Type, Options>
typeHad to do a decent amount of refactoring to be able to reuse the body parsing, this result in a much cleaner resolution of the body and other metadata properties across request, response and metadata.
The way it works now is instead of calling
gatherMetadata
that would just get the properties that are metadata but also ones with@body
and@bodyRoot
we now call aresolveHtpProperties
, this does the same resolution in term of filtering properties but it also figure out what is the kind of property in the concept of http(header, query, body, etc.) this leaves the error resolution to this function for duplicate annotations.What is nice is now we don't need to keep asking oh is this a query or a header or a body we can just check the kind of
HttpProperty
also resolve #1311