Skip to content

Commit a82aa4a

Browse files
Copilotjoseftw
andauthored
Update to .NET 9 and remove Swashbuckle (#3)
* Initial plan * Update to .NET 9 Co-authored-by: joseftw <[email protected]> * Remove Swashbuckle completely Co-authored-by: joseftw <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: joseftw <[email protected]>
1 parent 8795a4e commit a82aa4a

File tree

5 files changed

+8
-61
lines changed

5 files changed

+8
-61
lines changed

.github/workflows/dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v4
1212
- name: Setup .NET
13-
uses: actions/setup-dotnet@v3
13+
uses: actions/setup-dotnet@v4
1414
with:
1515
dotnet-version: |
16-
8.0.x
16+
9.0.x
1717
dotnet-quality: 'ga'
1818
- name: Verify
1919
run: dotnet test -c Release --verbosity normal

src/JOS.ApiKeyAuthentication.Web/Features/Swagger/SwaggerConfigurator.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<AssemblyName>JOS.ApiKeyAuthentication.Web</AssemblyName>
66
<RootNamespace>JOS.ApiKeyAuthentication.Web</RootNamespace>
77
</PropertyGroup>
88

9-
<ItemGroup>
10-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
11-
</ItemGroup>
12-
139
</Project>

src/JOS.ApiKeyAuthentication.Web/Startup.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Text.Json.Serialization;
33
using JOS.ApiKeyAuthentication.Web.Features.Authentication;
44
using JOS.ApiKeyAuthentication.Web.Features.Authorization;
5-
using JOS.ApiKeyAuthentication.Web.Features.Swagger;
65
using Microsoft.AspNetCore.Authorization;
76
using Microsoft.AspNetCore.Builder;
87
using Microsoft.Extensions.Configuration;
@@ -48,8 +47,6 @@ public void ConfigureServices(IServiceCollection services)
4847
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
4948
options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
5049
});
51-
52-
services.ConfigureSwaggerFeature();
5350
}
5451

5552
public void Configure(IApplicationBuilder app, IHostEnvironment env)
@@ -62,12 +59,6 @@ public void Configure(IApplicationBuilder app, IHostEnvironment env)
6259
app.UseAuthentication();
6360
app.UseAuthorization();
6461

65-
app.UseSwagger();
66-
app.UseSwaggerUI(c =>
67-
{
68-
c.SwaggerEndpoint("/swagger/v1/swagger.json", "JOS.ApiKeyAuthentication");
69-
});
70-
7162
app.UseEndpoints(endpoints =>
7263
{
7364
endpoints.MapControllers();

test/JOS.ApiKeyAuthentication.Web.Tests/JOS.ApiKeyAuthentication.Web.Tests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
9+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1111
<PackageReference Include="Shouldly" Version="4.2.1" />
12-
<PackageReference Include="xunit" Version="2.6.1" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
12+
<PackageReference Include="xunit" Version="2.9.2" />
13+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>

0 commit comments

Comments
 (0)