我想添加有关调用WebAPI的必要身份验证的说明,然后尝试做:
docData.forEach((item)=>{
firestore().collection('timeSlot')
.where('docId','==', item)
.get()
.then(function(doc) {
doc.forEach(function(docV) {
console.log("Slot data", docV.data());
});
});
});
但是我得到一个错误:
未获取错误/swagger/v1/swagger.json
如果我删除此行:
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new Info
{
Title = "Tablet Management",
Version = "v1",
Contact = new Contact
{
Name = "Oleg Shastitko",
Email = "oshastitko@3mdsolutions.com"
},
});
c.AddSecurityDefinition("oauth2", new ApiKeyScheme
{
Description = "Standard Authorization header using the Bearer scheme. Example: \"bearer {token}\"",
In = "header",
Name = "Authorization",
Type = "apiKey"
});
c.OperationFilter<SecurityRequirementsOperationFilter>();
它有效,但是没有我想要的。如何解决?