[TCGC] __raw
of SdkCredentialType
is the namespace
instead of the decorator itself
#2232
Labels
lib:tcgc
Issues for @azure-tools/typespec-client-generator-core library
As we all know,

SdkCredentialType
corresponds to the@useAuth
decorator, but its__raw
is the namespace with that decorator instead of the decorator itself.This would lead to when we want to report something wrong for the auth, the diagnostic will show up on the namespace instead of the auth itself.
This would be so confusing because in a lot of cases, the target of a decorator could be in a different file from the decorator itself.
For instance, if we have:
We should have the raw corresponding to the
ApiKeyAuth<ApiKeyLocation.cookie, "my-cookie">
part, or at least the decorator itself.The text was updated successfully, but these errors were encountered: