[release/10.0-rc1] Model nullable types using oneOf in OpenAPI schema#63325
Merged
wtgodbe merged 8 commits intorelease/10.0-rc1from Aug 19, 2025
Merged
[release/10.0-rc1] Model nullable types using oneOf in OpenAPI schema#63325wtgodbe merged 8 commits intorelease/10.0-rc1from
wtgodbe merged 8 commits intorelease/10.0-rc1from
Conversation
captainsafia
approved these changes
Aug 19, 2025
Contributor
|
Hi @@github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed. |
BrennanConroy
approved these changes
Aug 19, 2025
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.
Backport of #63301 to release/10.0-rc1
/cc @captainsafia
Model nullable types using oneOf in OpenAPI schema
Add oneOf support for nullable complex types in OpenAPI schemas
Description
This change improves OpenAPI schema generation for nullable types by using the
oneOfpattern instead of the nullable property for complex types and collections. The implementation:oneOfwith null and the actual type schema for nullable complex types in request/response schemasFixes #63301
Customer Impact
This change provides more accurate OpenAPI schema generation for nullable types, which improves:
Regression?
Risk
This is a low-risk change as it's a backport of an already-tested feature that improves schema generation without breaking existing functionality. The changes are isolated to OpenAPI schema generation logic and include new unit and integration tests for coverage. The implementation does consist of a breaking behavioral change so we'd like to get it in for RC1.
Verification
Packaging changes reviewed?