Skip to content

Commit 0485839

Browse files
committed
Remove swagger dependencies
1 parent 89e80e4 commit 0485839

File tree

6 files changed

+5
-28
lines changed

6 files changed

+5
-28
lines changed

tests/DevApps/ciam/myWebApi/Program.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,11 @@
1111
.AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd"));
1212

1313
builder.Services.AddControllers();
14-
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
14+
// Learn more about configuring OpenAPI at https://learn.microsoft.com/aspnet/core/fundamentals/openapi/aspnetcore-openapi
1515
builder.Services.AddEndpointsApiExplorer();
16-
builder.Services.AddSwaggerGen();
1716

1817
var app = builder.Build();
1918

20-
// Configure the HTTP request pipeline.
21-
if (app.Environment.IsDevelopment())
22-
{
23-
app.UseSwagger();
24-
app.UseSwaggerUI();
25-
}
26-
2719
app.UseHttpsRedirection();
2820

2921
app.UseAuthorization();

tests/DevApps/ciam/myWebApi/Properties/launchSettings.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"commandName": "Project",
1414
"dotnetRunMessages": true,
1515
"launchBrowser": true,
16-
"launchUrl": "swagger",
1716
"applicationUrl": "https://localhost:7082;http://localhost:5299;",
1817
"environmentVariables": {
1918
"ASPNETCORE_ENVIRONMENT": "Development"
@@ -22,7 +21,6 @@
2221
"IIS Express": {
2322
"commandName": "IISExpress",
2423
"launchBrowser": true,
25-
"launchUrl": "swagger",
2624
"environmentVariables": {
2725
"ASPNETCORE_ENVIRONMENT": "Development"
2826
}

tests/DevApps/ciam/myWebApi/myWebApi.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.10" />
13-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
12+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.10" />
1413
</ItemGroup>
1514

1615
<ItemGroup Condition="'$(UseWIP)' == 'false' ">

tests/DevApps/daemon-app/minimal-web-api/MinimalWebApi.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.2" />
11-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.10" />
1211
</ItemGroup>
1312

1413
<ItemGroup Condition="'$(UseWip)' != 'true'">

tests/DevApps/daemon-app/minimal-web-api/Program.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,13 @@
55
// Add services to the container.
66

77
builder.Services.AddControllers();
8-
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
8+
// Learn more about configuring OpenAPI at https://learn.microsoft.com/aspnet/core/fundamentals/openapi/aspnetcore-openapi
99
builder.Services.AddEndpointsApiExplorer();
10-
builder.Services.AddSwaggerGen();
1110

1211
builder.Services.AddMicrosoftIdentityWebApiAuthentication(builder.Configuration);
1312

1413
var app = builder.Build();
1514

16-
// Configure the HTTP request pipeline.
17-
if (app.Environment.IsDevelopment())
18-
{
19-
app.UseSwagger();
20-
app.UseSwaggerUI();
21-
}
22-
2315
app.UseHttpsRedirection();
2416

2517
app.UseAuthorization();

tests/DevApps/daemon-app/minimal-web-api/Properties/launchSettings.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"commandName": "Project",
1414
"dotnetRunMessages": true,
1515
"launchBrowser": true,
16-
"launchUrl": "swagger",
1716
"applicationUrl": "http://localhost:5047",
1817
"environmentVariables": {
1918
"ASPNETCORE_ENVIRONMENT": "Development"
@@ -23,7 +22,6 @@
2322
"commandName": "Project",
2423
"dotnetRunMessages": true,
2524
"launchBrowser": true,
26-
"launchUrl": "swagger",
2725
"applicationUrl": "https://localhost:7060;http://localhost:5047",
2826
"environmentVariables": {
2927
"ASPNETCORE_ENVIRONMENT": "Development"
@@ -32,7 +30,6 @@
3230
"IIS Express": {
3331
"commandName": "IISExpress",
3432
"launchBrowser": true,
35-
"launchUrl": "swagger",
3633
"environmentVariables": {
3734
"ASPNETCORE_ENVIRONMENT": "Development"
3835
}

0 commit comments

Comments
 (0)