Conversation
Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
…ght.Results.AspNetCore.Shared Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
…nSerializerContext again, refactored LightProblemDetailsResultJsonConverter Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
…dd additional comments about perf Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
…paces Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
…egoryExtensions Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR introduces ASP.NET Core Minimal APIs integration for the Light.Results library, enabling conversion of Result types to HTTP responses with RFC 7807/9457-compliant Problem Details serialization. The implementation prioritizes performance by avoiding ASP.NET Core's ProblemDetails.Extensions dictionary allocations and using source-generated JSON serialization.
Changes:
- Added new
Light.Results.AspNetCore.MinimalApisandLight.Results.AspNetCore.Sharedprojects with extension methods for converting Result types to Minimal API responses - Introduced
LightProblemDetailsResultfor high-performance Problem Details responses and enrichment infrastructure - Enhanced core library with HTTP status code mapping, error category extensions, and covariant interface support
Reviewed changes
Copilot reviewed 90 out of 90 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Light.Results.AspNetCore.MinimalApis/ |
New Minimal APIs integration with ToMinimalApiResult extensions, LightProblemDetailsResult, and JSON serialization |
src/Light.Results.AspNetCore.Shared/ |
Shared code for ASP.NET Core integrations including enrichment, serialization, and HTTP context injection |
src/Light.Results/ |
Core enhancements: HTTP extensions, GetLeadingCategory method, covariant interface support |
tests/Light.Results.Tests/ |
Added explicit Xunit imports removing global usings, new HTTP-related tests |
tests/Light.Results.AspNetCore.*.Tests/ |
Comprehensive test coverage for new ASP.NET Core integrations |
agents.md, .editorconfig |
Documentation and configuration updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kenny Pflug <[email protected]>
Signed-off-by: Kenny Pflug <[email protected]>
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.
Closes #7
This pull request introduces a new ASP.NET Core Minimal APIs integration for the
Light.Resultslibrary, enabling seamless conversion of result types to Minimal API responses and enhancing HTTP error handling. It also adds new projects and updates solution organization, along with documentation improvements and configuration tweaks.ASP.NET Core Minimal APIs Integration:
Light.Results.AspNetCore.MinimalApiswith extension methods (MinimalApiResultExtensions) to convertResultandResult<T>to Minimal APIIResultresponses, including enriched error handling and ProblemDetails conversion.LightProblemDetailsResult, a high-performance RFC 7807/9457-compliant Problem Details implementation for Minimal APIs, avoiding unnecessary allocations.IResultFactoryandDefaultResultFactory) for customizable result-to-response conversion, supporting dependency injection and options. [1] [2]Solution and Project Structure:
.editorconfigto include.slnxfiles for consistent formatting.Light.Results.slnx) to include new projects for Minimal APIs and shared ASP.NET Core logic, as well as related test projects and documentation files.Light.Results.AspNetCore.MinimalApisand its shared components.Documentation and Rules:
agents.mdfile at the root, clarifying coding standards and project setup..windsurf/rules/general-rules.md.