auth-scheme-not-supported
@azure-tools/typespec-java/auth-scheme-not-supportedSeverity: warning
This diagnostic is issued when an authentication scheme cannot be represented by the selected Java client flavor.
Impact
Section titled “Impact”The generated client may omit the scheme or fall back to a less specific credential type.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”API key outside a header
Section titled “API key outside a header”@service@useAuth(ApiKeyAuth<ApiKeyLocation.query, "api-key">)namespace Contoso;Basic authentication for an Azure client
Section titled “Basic authentication for an Azure client”@service@useAuth(BasicAuth)namespace Contoso;Diagnostic Message
Section titled “Diagnostic Message”The message identifies the unsupported scheme, location, or flavor. For example:
ApiKey auth is currently only supported for ApiKeyLocation.header.✅ How to Fix
Section titled “✅ How to Fix”Use OAuth2 authentication.
@service@useAuth(OAuth2Auth<[OAuthFlow]>)namespace Contoso;
model OAuthFlow { type: OAuth2FlowType.clientCredentials; tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token"; scopes: ["https://contoso.com/.default"];}Suppression
Section titled “Suppression”Do not suppress this warning unless custom code will provide the intended authentication behavior.