diff --git a/src/MaksIT.Core/Abstractions/Webapi/PatchRequestModelBase.cs b/src/MaksIT.Core/Abstractions/Webapi/PatchRequestModelBase.cs index 9f95b23..5296145 100644 --- a/src/MaksIT.Core/Abstractions/Webapi/PatchRequestModelBase.cs +++ b/src/MaksIT.Core/Abstractions/Webapi/PatchRequestModelBase.cs @@ -11,11 +11,6 @@ public abstract class PatchRequestModelBase : RequestModelBase { public Dictionary? Operations { get; set; } - private bool HasNonNullPatchField => GetType() - .GetProperties(BindingFlags.Public | BindingFlags.Instance) - .Where(prop => prop.Name != nameof(Operations)) - .Any(prop => prop.GetValue(this) != null); - /// /// Attempts to retrieve the patch operation associated with the specified property name (case insensitive). /// @@ -40,10 +35,6 @@ public abstract class PatchRequestModelBase : RequestModelBase { } public override IEnumerable Validate(ValidationContext validationContext) { - if (!HasNonNullPatchField) { - yield return new ValidationResult("At least one patch field must be provided", ["PatchField"]); - } - if (Operations != null) { foreach (var operation in Operations) { if (!Enum.IsDefined(typeof(PatchOperation), operation.Value)) { diff --git a/src/MaksIT.Core/MaksIT.Core.csproj b/src/MaksIT.Core/MaksIT.Core.csproj index 390eede..2dbbb13 100644 --- a/src/MaksIT.Core/MaksIT.Core.csproj +++ b/src/MaksIT.Core/MaksIT.Core.csproj @@ -8,7 +8,7 @@ MaksIT.Core - 1.4.3 + 1.4.4 Maksym Sadovnychyy MAKS-IT MaksIT.Core