diff --git a/src/Microsoft.OpenApi/Utils.cs b/src/Microsoft.OpenApi/Utils.cs index 10d5595f8..b025af8e7 100644 --- a/src/Microsoft.OpenApi/Utils.cs +++ b/src/Microsoft.OpenApi/Utils.cs @@ -20,7 +20,7 @@ internal static class Utils /// The input value. internal static T CheckArgumentNull( T value, - [CallerArgumentExpression("value")] string parameterName = "") + [CallerArgumentExpression(nameof(value))] string parameterName = "") { return value ?? throw new ArgumentNullException(parameterName, $"Value cannot be null: {parameterName}"); }