Skip to content

Add HttpRequestClientIdPropertyName to HttpRequestApi #7827

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

Closed

Conversation

jorgerangel-msft
Copy link
Contributor

@jorgerangel-msft jorgerangel-msft commented Jul 3, 2025

This PR updates the HttpRequestApi to include a new API for setting the RequestClientId property name for http request types.

contributes to Azure/azure-sdk-for-net#50627

@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 Jul 3, 2025
Copy link
Contributor

github-actions bot commented Jul 3, 2025

No changes needing a change description found.

@jorgerangel-msft jorgerangel-msft changed the title [wip] add HttpRequestClientIdPropertyName to HttpRequestApi Add HttpRequestClientIdPropertyName to HttpRequestApi Jul 3, 2025
@jorgerangel-msft jorgerangel-msft marked this pull request as ready for review July 3, 2025 22:56
@@ -24,5 +24,6 @@ protected HttpRequestApi(CSharpType type, ValueExpression original) : base(type,
public abstract ValueExpression Content();
public abstract HttpRequestApi FromExpression(ValueExpression original);
public abstract HttpRequestApi ToExpression();
public abstract string? ClientRequestIdPropertyName { get; }
Copy link
Member

Choose a reason for hiding this comment

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

why we must put a XXXName here?
These abstractions should be returning the expressions such as

public abstract ScopedApi<string>? ClientRequestId();

like we have above for Content - we did not have a HttpRequestContentPropertyName, instead we made a thing to return the corresponding expression.

@jorgerangel-msft
Copy link
Contributor Author

We will use a separate visitor instead of adding an additional API. Closing.

auto-merge was automatically disabled July 7, 2025 16:45

Pull request was closed

@jorgerangel-msft jorgerangel-msft deleted the update-httprequestapi branch July 15, 2025 21:02
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.

3 participants