File tree Expand file tree Collapse file tree 12 files changed +16
-29
lines changed
Expand file tree Collapse file tree 12 files changed +16
-29
lines changed Original file line number Diff line number Diff line change 1+ {
2+ // Use IntelliSense to learn about possible attributes.
3+ // Hover to view descriptions of existing attributes.
4+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+ "version" : " 0.2.0" ,
6+ "configurations" : [
7+ {
8+ "name" : " C#: Aspire Host" ,
9+ "type" : " dotnet" ,
10+ "request" : " launch" ,
11+ "projectPath" : " ${workspaceFolder}src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj"
12+ }
13+ ]
14+ }
Original file line number Diff line number Diff line change 3131 <PackageVersion Include =" OpenTelemetry.Instrumentation.Http" Version =" 1.15.0" />
3232 <PackageVersion Include =" OpenTelemetry.Instrumentation.Runtime" Version =" 1.5.1" />
3333 <PackageVersion Include =" StackExchange.Redis" Version =" 2.9.32" />
34- <PackageVersion Include =" Swashbuckle.AspNetCore" Version =" 6.5.0" />
3534 <PackageVersion Include =" xunit" Version =" 2.4.2" />
3635 <PackageVersion Include =" xunit.runner.visualstudio" Version =" 2.4.5" />
3736 <PackageVersion Include =" Yarp.ReverseProxy" Version =" 2.1.0" />
Original file line number Diff line number Diff line change 99 <PackageReference Include =" Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" />
1010 <PackageReference Include =" Aspire.Hosting.PostgreSQL" />
1111 <PackageReference Include =" Microsoft.AspNetCore.OpenApi" />
12- <PackageReference Include =" Swashbuckle.AspNetCore" />
1312 <PackageReference Include =" Microsoft.EntityFrameworkCore" />
1413 <PackageReference Include =" Microsoft.EntityFrameworkCore.Design" >
1514 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ public static IHostApplicationBuilder AddBasketServices(this IHostApplicationBui
1212 builder . AddNpgsqlDbContext < BasketDbContext > ( "BasketDb" ) ;
1313 builder . Services . AddMigration < BasketDbContext > ( ) ;
1414 builder . Services . AddEndpointsApiExplorer ( ) ;
15- builder . Services . AddSwaggerGen ( ) ;
1615 builder . Services . AddAuthentication ( )
1716 . AddBearerToken ( )
1817 . AddCookie ( ) ;
Original file line number Diff line number Diff line change 66
77var app = builder . Build ( ) ;
88
9- // Configure the HTTP request pipeline.
10- if ( app . Environment . IsDevelopment ( ) )
11- {
12- app . UseSwagger ( ) ;
13- app . UseSwaggerUI ( ) ;
14- }
15-
16- // app.UseHttpsRedirection();
17-
189app . MapDefaultEndpoints ( ) ;
1910
2011app . UseAuthentication ( ) ;
Original file line number Diff line number Diff line change 1515 <PackageReference Include =" Aspire.StackExchange.Redis" />
1616 <PackageReference Include =" Microsoft.AspNetCore.OpenApi" />
1717 <PackageReference Include =" StackExchange.Redis" />
18- <PackageReference Include =" Swashbuckle.AspNetCore" />
1918 <PackageReference Include =" Microsoft.EntityFrameworkCore" />
2019 <PackageReference Include =" Microsoft.EntityFrameworkCore.Design" >
2120 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ public static IHostApplicationBuilder AddCatalogServices(
5454 options . AddPolicy ( Cache . Policies . Authors , x => x . Tag ( Cache . Tags . Authors ) . Cache ( ) ) ;
5555 } ) ;
5656 builder . Services . AddScoped < ImageService > ( ) ;
57- builder . Services . AddSwaggerGen ( ) ;
5857 builder . Services . AddProblemDetails ( ) ;
5958 builder . Services . AddEndpointsApiExplorer ( ) ;
6059 builder . Services . AddOptions < CatalogOptions > ( )
Original file line number Diff line number Diff line change 77var app = builder . Build ( ) ;
88
99// Configure the HTTP request pipeline.
10- if ( app . Environment . IsDevelopment ( ) )
11- {
12- app . UseSwagger ( ) ;
13- app . UseSwaggerUI ( ) ;
14- }
15- else
10+ if ( ! app . Environment . IsDevelopment ( ) )
1611{
1712 app . UseHttpsRedirection ( ) ;
1813}
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ public static IHostApplicationBuilder AddIdentityServices(this IHostApplicationB
4747 builder . Services . AddAuthorizationBuilder ( ) ;
4848 builder . Services . AddScoped < UserIdMiddleware > ( ) ;
4949 builder . Services . AddEndpointsApiExplorer ( ) ;
50- builder . Services . AddSwaggerGen ( ) ;
5150 builder . Services
5251 . AddIdentity < ApplicationUser , IdentityRole > ( )
5352 . AddEntityFrameworkStores < ApplicationDbContext > ( )
Original file line number Diff line number Diff line change 88 <ItemGroup >
99 <PackageReference Include =" Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
1010 <PackageReference Include =" Microsoft.AspNetCore.OpenApi" />
11- <PackageReference Include =" Swashbuckle.AspNetCore" />
1211 <PackageReference Include =" Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" />
1312 <PackageReference Include =" Aspire.Hosting.PostgreSQL" />
1413 <PackageReference Include =" Microsoft.EntityFrameworkCore" />
You can’t perform that action at this time.
0 commit comments