Skip to content

Commit

Permalink
No need to GetTypeInfo() in JsonPatchOperationsArrayProvider since …
Browse files Browse the repository at this point in the history
…the library is already loaded
  • Loading branch information
mburumaxwell committed Jun 5, 2024
1 parent 4745812 commit b7dd81b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using System.Reflection;
using Tingle.AspNetCore.JsonPatch.Operations;

namespace Tingle.AspNetCore.JsonPatch;
Expand All @@ -27,7 +26,7 @@ public void OnProvidersExecuting(ApiDescriptionProviderContext context)
{
foreach (var parameterDescription in result.ParameterDescriptions)
{
if (typeof(IJsonPatchDocument).GetTypeInfo().IsAssignableFrom(parameterDescription.Type))
if (typeof(IJsonPatchDocument).IsAssignableFrom(parameterDescription.Type))
{
parameterDescription.Type = typeof(Operation[]);
parameterDescription.ModelMetadata = modelMetadataProvider.GetMetadataForType(typeof(Operation[]));
Expand Down

0 comments on commit b7dd81b

Please sign in to comment.