-
Notifications
You must be signed in to change notification settings - Fork 73
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 collectionFormat issue in header #1878
Conversation
@@ -304,4 +304,4 @@ function getAllOperations(model: CodeModel): Operation[] { | |||
} | |||
|
|||
return operations; | |||
} | |||
} |
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 didn't support this case in swagger side, because I didn't find a valid case anywhere and when I tried to build one the autorest would complain Unknown primitive schema array
.
I guess only primitive types are supported in header for autorest.
@@ -1,9 +1,9 @@ | |||
export const buildMultiCollectionContent = ` | |||
export function buildMultiCollection( | |||
queryParameters: 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.
Change the param name to item
because it is not limited to query params.
When touching the collectionFormat integration cases we generate string[] for header with format defined, but I notice that
RawHttpHeadersInput
only allows forstring|number|boolean
which means there would exist type inference conflict for this property.https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/src/interfaces.ts#L12-L15
To fix that we need to build a helper function for the default csv format for header.