Skip to content

Commit

Permalink
fix: null flag comparison
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Omondi <andrueastman@users.noreply.github.com>
  • Loading branch information
baywet and andrueastman authored Feb 3, 2025
1 parent 3b3d0e6 commit 081e251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Models/OpenApiSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ private void SerializeTypeProperty(JsonSchemaType? type, IOpenApiWriter writer,
{
// check whether nullable is true for upcasting purposes
var isNullable = Nullable ||
Type is JsonSchemaType.Null ||
(Type.HasValue && Type.Value.HasFlag(JsonSchemaType.Null)) ||
Extensions is not null &&
Extensions.TryGetValue(OpenApiConstants.NullableExtension, out var nullExtRawValue) &&
nullExtRawValue is OpenApiAny { Node: JsonNode jsonNode} &&
Expand Down

0 comments on commit 081e251

Please sign in to comment.