Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions src/ResidencyRoll.Api/Configuration/ConfigureSwaggerOptions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Asp.Versioning.ApiExplorer;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The namespace change from Microsoft.OpenApi.Models to Microsoft.OpenApi is incorrect. The types used in this file (OpenApiInfo, OpenApiSecurityScheme, SecuritySchemeType, ParameterLocation, OpenApiSecurityRequirement) are located in the Microsoft.OpenApi.Models namespace, not the root Microsoft.OpenApi namespace. This will cause compilation errors. The using statement should be using Microsoft.OpenApi.Models; to maintain access to these types.

Suggested change
using Microsoft.OpenApi;
using Microsoft.OpenApi.Models;

Copilot uses AI. Check for mistakes.
using Swashbuckle.AspNetCore.SwaggerGen;

namespace ResidencyRoll.Api.Configuration;
Expand Down Expand Up @@ -36,18 +36,11 @@ public void Configure(SwaggerGenOptions options)
Description = "JWT Authorization header using the Bearer scheme"
});

options.AddSecurityRequirement(new OpenApiSecurityRequirement
options.AddSecurityRequirement(document => new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = "Bearer"
}
},
Array.Empty<string>()
new OpenApiSecuritySchemeReference("Bearer", document, null),

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpenApiSecuritySchemeReference type does not exist in the Microsoft.OpenApi.Models namespace. The correct approach when updating to Swashbuckle.AspNetCore 10.x is to use an OpenApiSecurityScheme with a Reference property pointing to an OpenApiReference object. The constructor call with three parameters (id, document, null) does not match any known API in the OpenAPI or Swashbuckle libraries.

Copilot uses AI. Check for mistakes.
new List<string>()
}
});
Comment on lines +39 to 45

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AddSecurityRequirement method signature has been changed to accept a lambda function with a document parameter, but this API is not standard for Swashbuckle.AspNetCore. The typical AddSecurityRequirement method accepts an OpenApiSecurityRequirement instance directly, not a factory function. This change appears to be using a non-existent API and will cause compilation errors. The correct approach is to use the original pattern: create the OpenApiSecurityRequirement object with a proper OpenApiSecurityScheme reference.

Copilot uses AI. Check for mistakes.
}
Expand Down
4 changes: 2 additions & 2 deletions src/ResidencyRoll.Api/ResidencyRoll.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.3" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.20.1" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.71.0" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.3.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.4" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ResidencyRoll.Tests/ResidencyRoll.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="10.0.2" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="10.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.3" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/ResidencyRoll.Web/ResidencyRoll.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.3" />
<PackageReference Include="Radzen.Blazor" Version="9.0.4" />
<PackageReference Include="Radzen.Blazor" Version="9.0.5" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
</ItemGroup>

Expand Down
Loading