Swashbuckle是否有关于如何将持有者令牌传递给API的任何文档,我无法在升级到最新的swashbuckle ver 2.1之后传递持有者令牌
services.AddSwaggerGen(options =>
{
options.AddSecurityDefinition("oauth2", new ApiKeyScheme
{
Description = "Standard Authorization header using the Bearer scheme. Example: \"bearer {token}\"",
In = "header",
Name = "Authorization",
Type = "apiKey"
});
options.OperationFilter<SecurityRequirementsOperationFilter>();
你需要一份SecurityRequirementsOperationFilter,你可以通过谷歌搜索找到,或者从我的Swashbuckle.AspNetCore.Filters软件包安装。