Skip to content

Update dependencies and enhance OpenAPI schema handling - #309

Merged
marcominerva merged 2 commits into
masterfrom
develop
May 22, 2026
Merged

Update dependencies and enhance OpenAPI schema handling#309
marcominerva merged 2 commits into
masterfrom
develop

Conversation

@marcominerva

Copy link
Copy Markdown
Owner

This pull request introduces improvements to OpenAPI schema generation in the TinyHelpers.AspNetCore library, 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:

  • Added a new UseStrictNumericSchemas extension method and StrictNumericSchemaTransformer to remove the string fallback from numeric schemas in OpenAPI for .NET 10.0 or greater, ensuring stricter type representation. [1] [2] [3]
  • Improved the UseFullTypeNameSchemaIds method to generate more robust schema IDs by including namespaces and handling generics/nested types, reducing naming collisions.

Sample and API usage updates:

  • Updated the OpenAPI sample to use the new strict numeric schema option and clarified usage of JSON number handling in the sample API. [1] [2] [3]

Dependency updates:

  • Updated 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]
  • Updated test project dependencies, including Microsoft.NET.Test.Sdk and coverlet.collector, to the latest versions. [1] [2]

Versioning:

  • Bumped the library version from 4.1 to 4.2 in version.json.

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.
Copilot AI review requested due to automatic review settings May 22, 2026 10:13
@marcominerva
marcominerva merged commit ccb0822 into master May 22, 2026
7 checks passed
@marcominerva
marcominerva removed the request for review from Copilot May 22, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant