Conversation
b3c6756 to
d798cfd
Compare
1 task
There was a problem hiding this comment.
Pull request overview
This PR adds support for ASP.NET Core OpenAPI in .NET 10, introducing a new OptionalValues.OpenApi library that enables OptionalValue<T> types to be properly represented in OpenAPI documentation. The implementation includes a schema transformer that unwraps OptionalValue types to their underlying types while preserving nullability and validation attributes.
Key Changes
- Introduces new
OptionalValues.OpenApilibrary targeting .NET 10 with schema transformation support - Upgrades SDK to .NET 10 (10.0.100) and adds .NET 10 to target frameworks
- Adds comprehensive test infrastructure including a test application and integration tests
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| version.json | Bumps version to 0.8-preview and adds release configuration for preview releases |
| global.json | Updates SDK version to 10.0.100 for .NET 10 support |
| Directory.Build.props | Adds target framework variables for .NET 10 and differentiates Swashbuckle vs OpenApi frameworks |
| Directory.Packages.props | Adds .NET 10 package references (Microsoft.AspNetCore.OpenApi, Microsoft.AspNetCore.Mvc.Testing, Microsoft.Extensions.ApiDescription.Server) |
| src/OptionalValues.OpenApi/OptionalValuesSchemaTransformer.cs | Core transformer that unwraps OptionalValue types and applies schema transformations |
| src/OptionalValues.OpenApi/OpenApiOptionsExtensions.cs | Public API extension methods to enable OptionalValue support in OpenAPI configuration |
| src/OptionalValues.OpenApi/OptionalValues.OpenApi.csproj | Project file for new OpenAPI library targeting .NET 10 |
| src/OptionalValues.OpenApi/PublicAPI.*.txt | Public API surface documentation for the new library |
| src/OptionalValues.Swashbuckle/OptionalValues.Swashbuckle.csproj | Updates to use Swashbuckle-specific target frameworks |
| test/OptionalValues.OpenApi.Tests/* | Integration test suite that validates schema generation for primitives and references |
| test/OptionalValues.OpenApi.TestApp/* | Test web application with sample endpoints demonstrating OptionalValue usage |
| test/OptionalValues.Swashbuckle.Tests/OptionalValues.Swashbuckle.Tests.csproj | Updates to use Swashbuckle-specific target frameworks |
| examples/OptionalValues.Examples.OpenApi/* | Example application demonstrating OptionalValue with ASP.NET Core OpenAPI |
| examples/OptionalValues.Examples.Swashbuckle/* | Updates Swashbuckle example with version override and regenerated OpenAPI spec |
| OptionalValues.slnx | Adds new OpenAPI projects to solution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix formatting Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Add support for ASP.NET Core OpenAPI (.NET 10).
There is one known issue around circular references which requires dotnet/aspnetcore#64109 to be merged.