-
-
Notifications
You must be signed in to change notification settings - Fork 158
Make InputFormatters and OutputFormatters implement IApiRequestFormatMetadataProvider #967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
private bool IsAtomicOperationsType(Type objectType) | ||
{ | ||
return objectType.GetInterface(nameof(IEnumerable)) != null && objectType.GetGenericArguments().First() == _operationContainerType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to try why such complex logic is needed, instead of the obvious typeof(IList<OperationContainer>)
, but there are no tests. Add some tests first, please.
@@ -5,8 +5,8 @@ | |||
|
|||
namespace JsonApiDotNetCore.Middleware | |||
{ | |||
/// <inheritdoc /> | |||
public sealed class JsonApiInputFormatter : IJsonApiInputFormatter | |||
/// <inheritdoc cref="JsonApiDotNetCore.Middleware.IJsonApiInputFormatter" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the cref is to disambiguate between the docs on JsonApiFormatter and IJsonApiInputFormatter. We haven't used this before, but perhaps we should start doing that. Does this work correctly in:
- the generated documentation website?
- IntelliSense in IDE when consuming our NuGet?
JsonApiInputFormatter
implementsIApiRequestFormatMetadataProvider
.JsonApiOutputFormatter
implementsIApiResponseFormatMetadataProvider
.