-
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
Fix the query datetime support issue #1884
Conversation
import { RequestParameters } from "@azure-rest/core-client"; | ||
|
||
export interface TestHeaders { | ||
"execution-to"?: string; |
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.
why is this different with what has been defined in the typespec ?
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.
This handled by tsp compiler not us.
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.
@timotheeguerin Hi, do you have any context on this ? The only document I can found about header is that they are case insensitive, but it doesn't say this dash mark can also be ignored. https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
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.
The header decorator automatically convert camelCase to camel-case as the header value if you don’t specify an explicit value
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.
Is this documented somewhere? I mean in TypeSpec documentation.
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.
I thought we did but I can't seem to find it. Will create an issue
Generate the datetime as
Date | string
when the parameter is in query & model property, asstring
in header.