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

Integrate the cadl-ranch cases for encode and empty model cases #1875

Merged
merged 8 commits into from
Jun 2, 2023

Conversation

MaryGao
Copy link
Contributor

@MaryGao MaryGao commented Jun 2, 2023

Integrate the cadl-ranch cases for:

  • Empty model
  • @encode with header and query

@MaryGao MaryGao changed the title Add encode and empty model cases Integrate the cadl-ranch cases for encode and empty model cases Jun 2, 2023
.path(`/encode/duration/header/iso8601-array`)
.get({
headers: {
duration: ["P40D", "P50D"] as any
Copy link
Contributor Author

@MaryGao MaryGao Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiaozha I notice that RawHttpHeadersInput only allows for string|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

It feels like as any is just a walkaround and would suggest to update the RawHttpHeadersInput header to allow some values like string[] or also build a helper function for the default csv format.

How do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we should change the RawHttpHeadersInput to add string[] type. let's add a helper for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I'll apply that change.

@MaryGao MaryGao marked this pull request as ready for review June 2, 2023 03:37
@MaryGao MaryGao merged commit 9d38d3b into main Jun 2, 2023
53 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants