Skip to content

Commit 8534c41

Browse files
author
Bart Koelman
committed
Replaced suppression with fix
1 parent 4754049 commit 8534c41

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/JsonApiDotNetCore/Serialization/JsonApiReader.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ public async Task<InputFormatterResult> ReadAsync(InputFormatterContext context)
8383
ValidateRequestBody(model, body, context.HttpContext.Request);
8484
}
8585

86-
// ReSharper disable once AssignNullToNotNullAttribute
87-
// Justification: According to JSON:API we must return 200 OK without a body in some cases.
88-
return await InputFormatterResult.SuccessAsync(model);
86+
return model == null ? await InputFormatterResult.NoValueAsync() : await InputFormatterResult.SuccessAsync(model);
8987
}
9088

9189
private async Task<string> GetRequestBodyAsync(Stream bodyStream)

0 commit comments

Comments
 (0)