From 03897bb158811d1dfc793750f01757776a813c79 Mon Sep 17 00:00:00 2001 From: David Nelson Date: Mon, 17 Jun 2024 00:22:29 -0500 Subject: [PATCH] Fix nullable reference --- src/NSwag.Core/OpenApiOperation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NSwag.Core/OpenApiOperation.cs b/src/NSwag.Core/OpenApiOperation.cs index bf0e2f9ef7..a02a600433 100644 --- a/src/NSwag.Core/OpenApiOperation.cs +++ b/src/NSwag.Core/OpenApiOperation.cs @@ -170,7 +170,7 @@ public IReadOnlyList ActualParameters /// Gets the response body and dereferences it if necessary. [JsonIgnore] - public OpenApiRequestBody ActualRequestBody => RequestBody.ActualRequestBody; + public OpenApiRequestBody ActualRequestBody => RequestBody?.ActualRequestBody; /// Gets the responses from the operation and from the and dereferences them if necessary. [JsonIgnore]