We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4754049 commit 8534c41Copy full SHA for 8534c41
src/JsonApiDotNetCore/Serialization/JsonApiReader.cs
@@ -83,9 +83,7 @@ public async Task<InputFormatterResult> ReadAsync(InputFormatterContext context)
83
ValidateRequestBody(model, body, context.HttpContext.Request);
84
}
85
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);
+ return model == null ? await InputFormatterResult.NoValueAsync() : await InputFormatterResult.SuccessAsync(model);
89
90
91
private async Task<string> GetRequestBodyAsync(Stream bodyStream)
0 commit comments