chore(backend): add roslynator and fix diagnostics
This commit is contained in:
parent
649988db25
commit
f8e6032449
20 changed files with 60 additions and 38 deletions
|
@ -5,10 +5,11 @@ using Newtonsoft.Json.Serialization;
|
|||
namespace Foxnouns.Backend.Utils;
|
||||
|
||||
/// <summary>
|
||||
/// A base class used for PATCH requests which stores information on whether a key is explicitly set to null or not passed at all.
|
||||
///
|
||||
/// <para>A base class used for PATCH requests which stores information on whether a key is explicitly set to null or not passed at all.</para>
|
||||
/// <para>
|
||||
/// HasProperty() should not be used for properties that cannot be set to null--a null value should be treated
|
||||
/// as an unset value in those cases.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public abstract class PatchRequest
|
||||
{
|
||||
|
|
|
@ -63,7 +63,10 @@ public static partial class ValidationUtils
|
|||
string.Equals(u, username, StringComparison.InvariantCultureIgnoreCase)
|
||||
)
|
||||
)
|
||||
{
|
||||
return ValidationError.GenericValidationError("Username is not allowed", username);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -89,7 +92,10 @@ public static partial class ValidationUtils
|
|||
string.Equals(u, memberName, StringComparison.InvariantCultureIgnoreCase)
|
||||
)
|
||||
)
|
||||
{
|
||||
return ValidationError.GenericValidationError("Name is not allowed", memberName);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue