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]