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

[http-client-csharp]: Fix explode not being properly set for operation params #5396

Merged
merged 15 commits into from
Jan 15, 2025

Conversation

jorgerangel-msft
Copy link
Contributor

@jorgerangel-msft jorgerangel-msft commented Dec 17, 2024

This PR fixes an issue where the explode flag for a operation parameter was not being properly set when uri templates were specified. This is fixed now by passing through the value of explode from TCGC.

There are several follow ups that are still needed to fully support URI templates and path expansion.

fixes: #5134
regen preview for autorest: Azure/azure-sdk-for-net#47775

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Dec 17, 2024
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

Copy link
Member

@ArcturusZhang ArcturusZhang left a comment

Choose a reason for hiding this comment

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

In general, our definition of the parameter is quite cumbersome - all the parameters are sharing the same InputParameter model.
We should follow the definition of TCGC (they have discriminated models for each type of parameters) - @m_nash had the vision that our emitter should just redirect the data from TCGC therefore aligning their models on our side should be the first step.

But changing it is extremely complicated and we do not have to do it in this PR.
If you have further questions on how explode works, I think you could offline chat with @tadelesh

@jorgerangel-msft jorgerangel-msft marked this pull request as ready for review January 9, 2025 23:23
@jorgerangel-msft jorgerangel-msft added this pull request to the merge queue Jan 15, 2025
Merged via the queue into microsoft:main with commit 2a8d12c Jan 15, 2025
21 checks passed
@jorgerangel-msft jorgerangel-msft deleted the fix-param-explode branch January 15, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cadl-Ranch scenario - Explode parameter is always false even when it should be true
4 participants