-
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
Move content type default resolution to rest library #1311
Milestone
Comments
ghost
added
the
Needs Triage
label
Nov 24, 2022
est: 3 |
github-merge-queue bot
pushed a commit
that referenced
this issue
Jun 3, 2024
resolve #3046 [Playground](https://cadlplayground.z22.web.core.windows.net/prs/3342/) Add the following: - `@multipartBody` decorator - `File` type - `HttpPart<Type, Options>` type Had 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 a `resolveHtpProperties`, 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now if no content type is provided this is left to the openapi and autorest emitter to interpret. We should move the logic upstream in rest library.
The text was updated successfully, but these errors were encountered: