Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Enable the batch tsp & chat api tsp #2090
Enable the batch tsp & chat api tsp #2090
Changes from all commits
aa2b4c8
c81f020
be7bba1
375d30d
1091ccc
447162e
c92bfbc
5ce99da
4f3817d
54a4c80
d18c217
5566793
19beec6
4697bc2
f8df8c1
223ebea
96b30e2
18ad380
b0ec9fe
4b00247
f318b2e
b00c128
b1dec56
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we handle the
undefined
and empty array as different cases.undefined
means we don't have OAuth2 defined;[]
means we have OAuth2 defined but with empty scopes.Previously we treat the above two cases the same so all of them will not generate TokenCredential in constructor. But now they are different. The first would not but the latter would generate.
Please notice that we will not set the credentialScopes default value as
[]
. If the value is absent the core would populate with{endpoint}/.default
automatically.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is another place where we should consider if we are generating an Azure SDK or not since the
{endpoint}/.default
value only makes sense for Azure services.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, there may be another question - how to handle the empty scopes for non-Azure? How about explicitly set this as an empty array? Do we need to change the default logic for in
@typespec/ts-http-runtime
?But I think this topic would not block current pr considering we have a on-going one for integration #2083.