fix; Method output json-schema required state#22
Merged
IvanMurzak merged 13 commits intomainfrom Nov 9, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for .NET 8.0 target framework and adjusts the C# language version to accommodate multi-targeting across netstandard2.1, net8.0, and net9.0. The changes include test adaptations to handle different nullability detection behaviors between framework versions.
- Added net8.0 to target frameworks for the main library and test projects
- Downgraded C# language version from 11.0 to 10.0 in the main library
- Updated tests with conditional compilation to handle nullability detection differences across framework versions
- Improved test diagnostics in SchemaTestBase
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ReflectorNet/ReflectorNet.csproj | Added net8.0 target framework and downgraded language version to 10.0 |
| ReflectorNet.Tests/ReflectorNet.Tests.csproj | Added net8.0 target framework for tests |
| ReflectorNet.Tests.OuterAssembly/ReflectorNet.Tests.OuterAssembly.csproj | Added net8.0 target framework for outer assembly tests |
| ReflectorNet.Tests/SchemaTests/SchemaTestBase.cs | Added explicit failure case when required array is missing in AssertResultRequired |
| ReflectorNet.Tests/SchemaTests/ReturnSchemaTests.cs | Added conditional compilation directives to handle nullability detection differences between NET5+ and older frameworks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…urn type analysis
…d readability and maintainability
…coverage for nullable and non-nullable types
…ble_GenericTypeParameter method
…context value in MethodUtils
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…y and performance
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 both .NET 8 and .NET 9 across all test and main projects, and improves test coverage for schema generation by parameterizing tests to account for differences in nullability detection between frameworks. Additionally, it refines test assertions for required schema fields.
Multi-targeting and Framework Support
ReflectorNet.Tests.OuterAssembly.csproj,ReflectorNet.Tests.csproj, andReflectorNet/ReflectorNet.csprojto target bothnet8.0andnet9.0, ensuring compatibility and test coverage for both frameworks. Also, the main project now usesLangVersion10.0 for broader compatibility. [1] [2] [3]Test Improvements for Nullability and Required Fields
[Fact]tests inReturnSchemaTests.csto[Theory]with[InlineData], allowing tests to dynamically check for required fields based on the target framework's nullability detection capabilities. This includes tests for nullable custom types, complex lists, and wrapper classes. [1] [2] [3] [4]SchemaTestBase.csto fail explicitly if the schema does not contain a required array, making test failures clearer and more actionable.