Skip to content

Commit 0e38d50

Browse files
committed
Fix nullable reference types in ApiException for old language versions
1 parent 8a7edb2 commit 0e38d50

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiException.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ namespace {{packageName}}.{{clientPackage}}
3232
/// <summary>
3333
/// The HttpResponseMessage object
3434
/// </summary>
35-
public System.Net.Http.HttpResponseMessage? RawResponse { get; }
35+
public System.Net.Http.HttpResponseMessage{{#nrt}}?{{/nrt}} RawResponse { get; }
3636

3737
/// <summary>
3838
/// Construct the ApiException from parts of the response
3939
/// </summary>
4040
/// <param name="reasonPhrase"></param>
4141
/// <param name="statusCode"></param>
4242
/// <param name="rawContent"></param>
43-
public ApiException(string{{nrt?}} reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent, System.Net.Http.HttpResponseMessage? rawResponse = null) : base(reasonPhrase ?? rawContent)
43+
public ApiException(string{{nrt?}} reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent, System.Net.Http.HttpResponseMessage{{#nrt}}?{{/nrt}} rawResponse = null) : base(reasonPhrase ?? rawContent)
4444
{
4545
ReasonPhrase = reasonPhrase;
4646

0 commit comments

Comments
 (0)