Add basic swagger support
This commit is contained in:
parent
a311cf9f3e
commit
0452f379c6
@ -60,10 +60,17 @@ builder.Services.AddKeyedTransient<IProductQueryModifier, Sleeve>("Монтаж
|
||||
.AddKeyedTransient<IProductQueryModifier, StabilPipe>("Stabil")
|
||||
.AddKeyedTransient<IProductQueryModifier, BlackPipe>("Black");
|
||||
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.MapControllers();
|
||||
app.UseMiddleware<QueryModifier>();
|
||||
app.UseSwagger().UseSwaggerUI(options =>
|
||||
{
|
||||
options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1");
|
||||
options.RoutePrefix = string.Empty;
|
||||
});
|
||||
|
||||
var context = app.Services.CreateScope().ServiceProvider
|
||||
.GetRequiredService<RhSolutionsContext>();
|
||||
|
@ -19,6 +19,7 @@
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.0" />
|
||||
<PackageReference Include="Rhsolutions.ProductSku" Version="1.0.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user