diff --git a/8.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity/CookieAuthenticationStateProvider.cs b/8.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity/CookieAuthenticationStateProvider.cs index e69c860e5..8a8fc9305 100644 --- a/8.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity/CookieAuthenticationStateProvider.cs +++ b/8.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity/CookieAuthenticationStateProvider.cs @@ -1,9 +1,10 @@ +using System.Net; using System.Net.Http.Json; using System.Security.Claims; +using System.Text; using System.Text.Json; using Microsoft.AspNetCore.Components.Authorization; using BlazorWasmAuth.Identity.Models; -using System.Text; namespace BlazorWasmAuth.Identity { diff --git a/9.0/BlazorWebAssemblyStandaloneWithIdentity/Backend/Backend.csproj b/9.0/BlazorWebAssemblyStandaloneWithIdentity/Backend/Backend.csproj index 5ca700710..4015a857c 100644 --- a/9.0/BlazorWebAssemblyStandaloneWithIdentity/Backend/Backend.csproj +++ b/9.0/BlazorWebAssemblyStandaloneWithIdentity/Backend/Backend.csproj @@ -9,8 +9,8 @@ + - diff --git a/9.0/BlazorWebAssemblyStandaloneWithIdentity/Backend/Program.cs b/9.0/BlazorWebAssemblyStandaloneWithIdentity/Backend/Program.cs index 968b2b789..9499ae813 100644 --- a/9.0/BlazorWebAssemblyStandaloneWithIdentity/Backend/Program.cs +++ b/9.0/BlazorWebAssemblyStandaloneWithIdentity/Backend/Program.cs @@ -56,8 +56,8 @@ // add services to the container builder.Services.AddEndpointsApiExplorer(); -// add NSwag services -builder.Services.AddOpenApiDocument(); +// add OpenAPI services +builder.Services.AddOpenApi(); var app = builder.Build(); @@ -67,9 +67,8 @@ await using var scope = app.Services.CreateAsyncScope(); await SeedData.InitializeAsync(scope.ServiceProvider); - // add OpenAPI/Swagger generator and the Swagger UI - app.UseOpenApi(); - app.UseSwaggerUi(); + // resolve OpenAPI document + app.MapOpenApi(); } // create routes for the identity endpoints diff --git a/9.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity/CookieAuthenticationStateProvider.cs b/9.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity/CookieAuthenticationStateProvider.cs index e69c860e5..8a8fc9305 100644 --- a/9.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity/CookieAuthenticationStateProvider.cs +++ b/9.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity/CookieAuthenticationStateProvider.cs @@ -1,9 +1,10 @@ +using System.Net; using System.Net.Http.Json; using System.Security.Claims; +using System.Text; using System.Text.Json; using Microsoft.AspNetCore.Components.Authorization; using BlazorWasmAuth.Identity.Models; -using System.Text; namespace BlazorWasmAuth.Identity {