Skip to content

Commit a5023d6

Browse files
committed
fix: null reference check
Signed-off-by: Vincent Biret <[email protected]>
1 parent ac05342 commit a5023d6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Microsoft.OpenApi/Models/OpenApiSchema.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ private void SerializeTypeProperty(JsonSchemaType? type, IOpenApiWriter writer,
633633
{
634634
// check whether nullable is true for upcasting purposes
635635
var isNullable = Nullable ||
636+
Extensions is not null &&
636637
Extensions.TryGetValue(OpenApiConstants.NullableExtension, out var nullExtRawValue) &&
637638
nullExtRawValue is OpenApiAny openApiAny &&
638639
openApiAny.Node is JsonNode jsonNode &&

0 commit comments

Comments
 (0)