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

Fix handling of filename for http file #3538

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Jun 6, 2024

fix #3532

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jun 6, 2024

All changed packages have been documented.

  • @typespec/http
Show changes

@typespec/http - internal ✏️

Fix handling of filename for http file

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3538/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3538/

@weidongxu-microsoft
Copy link
Contributor

weidongxu-microsoft commented Jun 11, 2024

Is there a way to say "filename default to <some_name> if not provided by user" (a kind of client default)? -- the usual case for this is that filename is required on backend and client want to provide a default (e.g. openai)

@msyyc
Copy link
Contributor

msyyc commented Jun 11, 2024

Is there a way to say "filename default to <some_name> if not provided by user" (a kind of client default)? -- the usual case for this is that filename is required on backend and client want to provide a default (e.g. openai)

Ever discussed here #3046 (comment) while it seems no plan to support "define default value in client side" in Typespec.

@chunyu3
Copy link
Contributor

chunyu3 commented Jun 11, 2024

Is there a way to say "filename default to <some_name> if not provided by user" (a kind of client default)? -- the usual case for this is that filename is required on backend and client want to provide a default (e.g. openai)

Ever discussed here #3046 (comment) while it seems no plan to support "define default value in client side" in Typespec.

.NET does not honor client-side-default-value, but we honor constant. so if the filename is define as filename: "file" it is a constant, .NET will not expose parameter for filename, but will set filename=file in the http request in content-dispose header.

@timotheeguerin timotheeguerin added this pull request to the merge queue Jun 11, 2024
Merged via the queue into microsoft:main with commit 7a0212b Jun 11, 2024
21 checks passed
@timotheeguerin timotheeguerin deleted the fix/http-file-handling branch June 11, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][http] can't declare requiredness for meta properties about file part of multipart
6 participants