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

Cadl-Ranch scenario - Nonalpha chars are removed from parameter templates #5144

Closed
JoshLove-msft opened this issue Nov 19, 2024 · 3 comments
Closed
Assignees
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@JoshLove-msft
Copy link
Contributor

As an example, https://github.com/Azure/cadl-ranch/blob/main/packages/cadl-ranch-specs/http//routes/main.tsp#L226. But in our tspCodeModel.json, we have https://github.com/microsoft/typespec/blob/main/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/tspCodeModel.json#L1483. So either in TCGC or in the csharp emitter, these chars are being incorrectly removed.

@JoshLove-msft JoshLove-msft added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Nov 19, 2024
@JoshLove-msft JoshLove-msft changed the title Nonalpha chars are removed from parameter templates Cadl-Ranch scenario: Nonalpha chars are removed from parameter templates Dec 3, 2024
@JoshLove-msft JoshLove-msft changed the title Cadl-Ranch scenario: Nonalpha chars are removed from parameter templates Cadl-Ranch scenario - Nonalpha chars are removed from parameter templates Dec 3, 2024
@ArcturusZhang
Copy link
Member

ArcturusZhang commented Jan 21, 2025

Hi @JoshLove-msft
The Path here (corresponds to path property in TCGC) is by design to remove that dot character . because it is not part of the "path", but it is a feature of uri-template.
We did not do anything to it:


It is known issue that we did not fully support uri-template feature. Currently we only support allow-reserved and explode.
Since we did not really adopt uri-template here, it would not help if we have its original route with the dot.
And FYI we could get the original route in the uriTemplate property from SdkHttpOperation.

Given this information, I think we might need to retriage this again and put it into a bucket of "supporting uri-template".
Also because of this situation, we cannot implement those various scenarios in http/routes.

@JoshLove-msft
Copy link
Contributor Author

It is known issue that we did not fully support uri-template feature. Currently we only support allow-reserved and explode.

Do we have any issues open for supporting uri-template? Do you mean that csharp emitter doesn't support it?

@JoshLove-msft
Copy link
Contributor Author

JoshLove-msft commented Jan 21, 2025

Ah I see it is filed here - #5561

Closing as this scenario is covered by #5561

@JoshLove-msft JoshLove-msft self-assigned this Jan 24, 2025
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

No branches or pull requests

2 participants