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

report diagnostics on unsupported auth #5496

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ArcturusZhang
Copy link
Member

@ArcturusZhang ArcturusZhang commented Jan 6, 2025

Fixes #5302

it works like this:
image

@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 Jan 6, 2025
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

@typespec/http-client-csharp

@ArcturusZhang ArcturusZhang marked this pull request as ready for review January 7, 2025 07:56
Copy link
Contributor

@jorgerangel-msft jorgerangel-msft left a comment

Choose a reason for hiding this comment

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

Is it possible to add some unit tests for this that tests that the diagnostic is reported as expected?

return { ApiKey: { Name: scheme.name } } as InputAuth;
if (scheme.in !== "header") {
Logger.getInstance().warn(
`Only header is supported for ApiKey auth method. ${scheme.in} is not supported.`,
Copy link
Contributor

@jorgerangel-msft jorgerangel-msft Jan 7, 2025

Choose a reason for hiding this comment

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

How about: Only header is supported for ApiKey authentication. ${scheme.in} is not supported. ?

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.

[http-client-csharp] cookie auth is generating incorrect code
3 participants