upgrade: 8.0.2
This commit is contained in:
parent
580d352a10
commit
40c9d88885
@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- All Fake packages -->
|
<!-- All Fake packages -->
|
||||||
<FakePackageVersion>8.0.1</FakePackageVersion>
|
<FakePackageVersion>8.0.2</FakePackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"launchUrl": "swagger/index.html",
|
"launchUrl": "index.html",
|
||||||
"applicationUrl": "http://localhost:8889",
|
"applicationUrl": "http://localhost:8889",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
|||||||
@ -70,30 +70,7 @@ public class TrackCenterApiModule : FakeModule
|
|||||||
options.SerializerSettings.Converters.Add(new LongJsonConverter());
|
options.SerializerSettings.Converters.Add(new LongJsonConverter());
|
||||||
});
|
});
|
||||||
|
|
||||||
services.AddFakeSwaggerGen(options =>
|
services.AddFakeSwaggerGen(addSecurity:true)
|
||||||
{
|
|
||||||
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme()
|
|
||||||
{
|
|
||||||
Description = "JWT授权数据将在请求头中进行传输,在下方输入Bearer {token} 即可,注意两者之间有空格",
|
|
||||||
Name = "Authorization",
|
|
||||||
In = ParameterLocation.Header,
|
|
||||||
Type = SecuritySchemeType.ApiKey
|
|
||||||
});
|
|
||||||
options.AddSecurityRequirement(new OpenApiSecurityRequirement
|
|
||||||
{
|
|
||||||
{
|
|
||||||
new OpenApiSecurityScheme
|
|
||||||
{
|
|
||||||
Reference = new OpenApiReference()
|
|
||||||
{
|
|
||||||
Id = "Bearer",
|
|
||||||
Type = ReferenceType.SecurityScheme
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.AddFakeAspNetCoreAuditing();
|
.AddFakeAspNetCoreAuditing();
|
||||||
|
|
||||||
services.AddFluentValidationAutoValidation().AddFluentValidationClientsideAdapters();
|
services.AddFluentValidationAutoValidation().AddFluentValidationClientsideAdapters();
|
||||||
@ -168,6 +145,9 @@ public class TrackCenterApiModule : FakeModule
|
|||||||
await next.Invoke();
|
await next.Invoke();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 虚拟路由-网关适配
|
||||||
|
app.UsePathBase(app.Configuration["ASPNETCORE_PATHBASE"]);
|
||||||
|
|
||||||
app.UseFakeExceptionHandling();
|
app.UseFakeExceptionHandling();
|
||||||
|
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user