From 43248b5f7c901d76a9879bcf12615fbae73daf99 Mon Sep 17 00:00:00 2001 From: Noah Stolk <31079637+NoahStolk@users.noreply.github.com> Date: Thu, 11 May 2023 11:27:29 +0200 Subject: [PATCH 1/2] Disable warning CS8604 "Possible null reference argument for parameter" in code generation file header template --- src/NSwag.CodeGeneration.CSharp/Templates/File.Header.liquid | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NSwag.CodeGeneration.CSharp/Templates/File.Header.liquid b/src/NSwag.CodeGeneration.CSharp/Templates/File.Header.liquid index 5a988ae2f7..4d747b8a7c 100644 --- a/src/NSwag.CodeGeneration.CSharp/Templates/File.Header.liquid +++ b/src/NSwag.CodeGeneration.CSharp/Templates/File.Header.liquid @@ -6,4 +6,5 @@ #pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." #pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" #pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" \ No newline at end of file +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" \ No newline at end of file From 7e4855f89d9244046aecf0e56259ecfc6648f56c Mon Sep 17 00:00:00 2001 From: Noah Stolk <31079637+NoahStolk@users.noreply.github.com> Date: Thu, 11 May 2023 14:01:46 +0200 Subject: [PATCH 2/2] Restore warning in file footer --- src/NSwag.CodeGeneration.CSharp/Templates/File.Footer.liquid | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NSwag.CodeGeneration.CSharp/Templates/File.Footer.liquid b/src/NSwag.CodeGeneration.CSharp/Templates/File.Footer.liquid index 43ec8e4998..63efedac81 100644 --- a/src/NSwag.CodeGeneration.CSharp/Templates/File.Footer.liquid +++ b/src/NSwag.CodeGeneration.CSharp/Templates/File.Footer.liquid @@ -6,4 +6,5 @@ #pragma warning restore 1591 #pragma warning restore 8073 #pragma warning restore 3016 -#pragma warning restore 8603 \ No newline at end of file +#pragma warning restore 8603 +#pragma warning restore 8604 \ No newline at end of file