Update dependencies and enhance OpenAPI schema handling - #309
Merged
Conversation
Updated NuGet packages to latest patch versions for better stability and security. Enhanced OpenApiExtensions to generate schema reference IDs with namespaces, improving clarity and uniqueness in OpenAPI documentation.
Introduce StrictNumericSchemaTransformer to remove string fallback from numeric OpenAPI schemas when running on .NET 10 or greater. Add UseStrictNumericSchemas extension and enable it in Program.cs. Update /api/json-number-as-string endpoint to require an int parameter for accurate schema generation. Increment version to 4.2 and clarify comments regarding JsonNumberHandling.
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 introduces improvements to OpenAPI schema generation in the
TinyHelpers.AspNetCorelibrary, particularly around numeric schema strictness and schema ID generation. It also updates several package dependencies across the solution and increments the package version.OpenAPI enhancements:
UseStrictNumericSchemasextension method andStrictNumericSchemaTransformerto remove the string fallback from numeric schemas in OpenAPI for .NET 10.0 or greater, ensuring stricter type representation. [1] [2] [3]UseFullTypeNameSchemaIdsmethod to generate more robust schema IDs by including namespaces and handling generics/nested types, reducing naming collisions.Sample and API usage updates:
Dependency updates:
Microsoft.AspNetCore.OpenApi,System.Text.Json,Microsoft.EntityFrameworkCore.SqlServer,Microsoft.Data.SqlClient, and other related package references to their latest patch versions across multiple projects, improving compatibility and security. [1] [2] [3] [4] [5]Microsoft.NET.Test.Sdkandcoverlet.collector, to the latest versions. [1] [2]Versioning:
version.json.