-
Notifications
You must be signed in to change notification settings - Fork 75
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
Support File
for multipart/form data in RLC
#2258
Conversation
File
for multipart/form data in RLC
packages/typespec-ts/test/integration/generated/mediaTypes/src/parameters.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, the only question I have is around bytes generating string instead of uint8array
@joheredi The pr implementation is to have a white list to translate bytes to binary/file/string according to encode/content-type context. For unrecognized cases it would go to default logic as This would be debatable. First I would be more caring about the existence possibility of these unrecognized cases so I created issues to figure out them(#2278 and #2276); Secondly if the default type is uint8Array I am not sure the core logic is correct(https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client-rest/src/sendRequest.ts#L145) and setting as string would require customers to handle encode and may work around from e2e side. So I prefer to have string then to keep collecting the real cases. How do you think? |
8c96e33
to
759ca63
Compare
fixes #2176 and #2196 and #2200
The pr would cover the followings:
bytes
to| string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream | File
createFile, createFileFromStream
and relevant options from @azure/core-rest-pipelinePlease note below issues are NOT covered in this pr:
|
in getSchemaForType #2273