Rename SupportsNullableProperty to DoesNotSupportNullValue#67386
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR corrects the naming of a local helper in JsonNodeSchemaExtensions.ApplyParameterInfo, aligning it with the actual behavior: removing null from the generated OpenAPI schema types for binding sources where model binding doesn’t support nullable values.
Changes:
- Renames
SupportsNullablePropertytoDoesNotSupportNullValueto reflect that the code path removesnullfrom the schema. - Updates the call site to use the renamed helper.
Comments suppressed due to low confidence (1)
src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs:420
- The binding source list in
DoesNotSupportNullValueduplicatesIsNonBodyBindingSourcedirectly below. Keeping two independent copies makes it easy for the lists to drift and produce inconsistent behavior if new binding sources are added/removed later.
static bool DoesNotSupportNullValue(BindingSource bindingSource) => bindingSource == BindingSource.Header
|| bindingSource == BindingSource.Query
|| bindingSource == BindingSource.Path
|| bindingSource == BindingSource.Form
|| bindingSource == BindingSource.FormFile;
Youssef1313
enabled auto-merge (squash)
June 23, 2026 14:59
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.
Following a discussion with @mikekistler, the method name is wrong. It's used actually in a code path that removes "null" flag.