Open MaryGao opened 5 months ago
i believe current test already use the decorator and has the auth definition: https://github.com/Azure/cadl-ranch/blob/e64514785094c3ef1722b164ba3cbc8e70e00c2c/packages/cadl-ranch-specs/http/azure/resource-manager/models/resources/main.tsp#L18
Wonder if it's necessary. The acquired token can only be mocked by each client, not through normal flow(e.g. ClientSecret or Azure CLI).
In typespec-azure-resource-manager it would directly add the defulat outh2 for ARM spec. It may introduce a token credential for some languages. We should validate this token for ARM cases in mockapi.ts.
https://github.com/Azure/typespec-azure/blob/54567f763257300e64603091659d282072631d2a/packages/typespec-azure-resource-manager/src/namespace.ts#L199-L213