File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
8.0/BlazorWebAssemblyStandaloneWithIdentity/BlazorWasmAuth/Identity
9.0/BlazorWebAssemblyStandaloneWithIdentity Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change
1
+ using System . Net ;
1
2
using System . Net . Http . Json ;
2
3
using System . Security . Claims ;
4
+ using System . Text ;
3
5
using System . Text . Json ;
4
6
using Microsoft . AspNetCore . Components . Authorization ;
5
7
using BlazorWasmAuth . Identity . Models ;
6
- using System . Text ;
7
8
8
9
namespace BlazorWasmAuth . Identity
9
10
{
Original file line number Diff line number Diff line change 9
9
10
10
<ItemGroup >
11
11
<PackageReference Include =" Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version =" 9.0.0" />
12
+ <PackageReference Include =" Microsoft.AspNetCore.OpenApi" Version =" 9.0.7" />
12
13
<PackageReference Include =" Microsoft.EntityFrameworkCore.InMemory" Version =" 9.0.0" />
13
- <PackageReference Include =" NSwag.AspNetCore" Version =" 14.1.0" />
14
14
</ItemGroup >
15
15
16
16
</Project >
Original file line number Diff line number Diff line change 56
56
// add services to the container
57
57
builder . Services . AddEndpointsApiExplorer ( ) ;
58
58
59
- // add NSwag services
60
- builder . Services . AddOpenApiDocument ( ) ;
59
+ // add OpenAPI services
60
+ builder . Services . AddOpenApi ( ) ;
61
61
62
62
var app = builder . Build ( ) ;
63
63
67
67
await using var scope = app . Services . CreateAsyncScope ( ) ;
68
68
await SeedData . InitializeAsync ( scope . ServiceProvider ) ;
69
69
70
- // add OpenAPI/Swagger generator and the Swagger UI
71
- app . UseOpenApi ( ) ;
72
- app . UseSwaggerUi ( ) ;
70
+ // resolve OpenAPI document
71
+ app . MapOpenApi ( ) ;
73
72
}
74
73
75
74
// create routes for the identity endpoints
Original file line number Diff line number Diff line change
1
+ using System . Net ;
1
2
using System . Net . Http . Json ;
2
3
using System . Security . Claims ;
4
+ using System . Text ;
3
5
using System . Text . Json ;
4
6
using Microsoft . AspNetCore . Components . Authorization ;
5
7
using BlazorWasmAuth . Identity . Models ;
6
- using System . Text ;
7
8
8
9
namespace BlazorWasmAuth . Identity
9
10
{
You can’t perform that action at this time.
0 commit comments