Skip to content

Commit

Permalink
removes warnings when using system.text.json in combination with null…
Browse files Browse the repository at this point in the history
…able reference types
  • Loading branch information
cm-andrews committed Aug 16, 2024
1 parent 7d6df3a commit 366973d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/NSwag.CodeGeneration.CSharp/Templates/File.Header.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
#pragma warning disable 8603 // Disable "CS8603 Possible null reference return"
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference"
#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type"
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference"
#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type"

namespace MyNamespace
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference"
#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type"

namespace MyNamespace
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference"
#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type"

namespace MyNamespace
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference"
#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type"

namespace MyNamespace
{
Expand Down
2 changes: 2 additions & 0 deletions src/NSwag.Sample.NET80Minimal/GeneratedClientsCs.gen
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference"
#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type"

namespace MyNamespace
{
Expand Down
2 changes: 2 additions & 0 deletions src/NSwag.Sample.NET80Minimal/GeneratedControllersCs.gen
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference"
#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type"

namespace MyNamespace
{
Expand Down

0 comments on commit 366973d

Please sign in to comment.