Merged
Conversation
Updated projects to target .NET 10, leveraging new features and APIs. Upgraded dependencies, including `Microsoft.AspNetCore.OpenApi` and `Swashbuckle.AspNetCore.SwaggerUI`, to their latest versions. Introduced conditional compilation for `net10.0` to support new framework-specific features. Enhanced OpenAPI integration: - Added `DefaultResponseDocumentTransformer` for error schemas. - Added `OAuth2AuthenticationDocumentTransformer` for OAuth2 support. - Improved `AuthenticationDocumentTransformer` and `AuthenticationOperationTransformer` for security schemes and authorization policies. Removed outdated `#if NET9_0_OR_GREATER` directives and replaced them with more specific conditions. Ensured backward compatibility with `net8.0` and `net9.0`.
Updated project files to upgrade `Swashbuckle.AspNetCore` to v10.0.0 and align with OpenAPI 3.1. Refactored `Program.cs` to use `.WithDescription()` for better readability. Added `net10.0` support in `SimpleAuthentication.Swashbuckle.csproj`. Replaced `Microsoft.OpenApi.Models` with `Microsoft.OpenApi` across multiple files to align with updated libraries. Refactored `SwaggerExtensions.cs` to improve flexibility and maintainability by introducing helper methods and supporting additional security definitions. Upgraded `Nerdbank.GitVersioning` to v3.9.50 and made general improvements to simplify OpenAPI constructs and enhance compatibility with newer library versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the project to support .NET 10.0 and the latest versions of related dependencies, including C# 14 and Swashbuckle 10.0.0. It also updates sample projects and refines Swagger integration to use new OpenAPI types and improved extension methods.
.NET and C# version updates:
.NET 10.0and use C# 14 features, ensuring compatibility with the latest language and runtime features. (.github/copilot-instructions.md [1] samples//.csproj [2] [3] src/SimpleAuthentication.Abstractions/SimpleAuthentication.Abstractions.csproj [4] src/SimpleAuthentication.Swashbuckle/SimpleAuthentication.Swashbuckle.csproj [5]Dependency upgrades:
Microsoft.AspNetCore.OpenApi,Swashbuckle.AspNetCore.SwaggerUI,Swashbuckle.AspNetCore.SwaggerGen, andMicrosoft.AspNetCore.Authentication.JwtBearerfor all supported target frameworks. (samples//.csproj [1] [2] [3] src/SimpleAuthentication.Abstractions/SimpleAuthentication.Abstractions.csproj [4] src/SimpleAuthentication.Swashbuckle/SimpleAuthentication.Swashbuckle.csproj [5] [6] [7]Swagger/OpenAPI integration improvements:
Microsoft.OpenApitypes instead ofMicrosoft.OpenApi.Models, updated helper methods, and improved extension methods for adding authentication support in Swagger, including better handling of additional security definitions. (src/SimpleAuthentication.Swashbuckle/Swagger/AuthenticationOperationFilter.cs [1] Swagger/OpenApiHelpers.cs [2] [3] Swagger/ProblemDetailsDocumentFilter.cs [4] SwaggerExtensions.cs [5] [6] [7] [8]Sample project enhancements:
.WithDescription()instead of.WithOpenApi()for endpoint documentation). (samples/MinimalApis/Net8JwtBearerSample/Net8JwtBearerSample.csproj [1] Program.cs [2] [3] [4] [5]Project structure and references:
These changes collectively modernize the codebase, improve maintainability, and ensure compatibility with the latest .NET and OpenAPI tooling.