Skip to content

Commit dd199ab

Browse files
committed
fix: Updated ContentHeaders to be compatible with older versions of .NET
1 parent 99fbc55 commit dd199ab

49 files changed

Lines changed: 147 additions & 147 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,8 @@ using System.Net.Http.Headers;
421421
/// The collection of content headers as per
422422
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
423423
/// </summary>
424-
private static readonly string[] ContentHeaders =
425-
[
424+
private static readonly string[] ContentHeaders = new String[]
425+
{
426426
"allow",
427427
"content-encoding",
428428
"content-disposition",
@@ -434,7 +434,7 @@ using System.Net.Http.Headers;
434434
"content-type",
435435
"expires",
436436
"last-modified"
437-
];
437+
};
438438

439439
/// <summary>
440440
/// The base path of the API

samples/client/petstore/csharp/generichost/latest/ComposedEnum/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ public static bool IsContentHeader(string header)
321321
/// The collection of content headers as per
322322
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
323323
/// </summary>
324-
private static readonly string[] ContentHeaders =
325-
[
324+
private static readonly string[] ContentHeaders = new String[]
325+
{
326326
"allow",
327327
"content-encoding",
328328
"content-disposition",
@@ -334,7 +334,7 @@ public static bool IsContentHeader(string header)
334334
"content-type",
335335
"expires",
336336
"last-modified"
337-
];
337+
};
338338

339339
/// <summary>
340340
/// The base path of the API

samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ public static bool IsContentHeader(string header)
315315
/// The collection of content headers as per
316316
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
317317
/// </summary>
318-
private static readonly string[] ContentHeaders =
319-
[
318+
private static readonly string[] ContentHeaders = new String[]
319+
{
320320
"allow",
321321
"content-encoding",
322322
"content-disposition",
@@ -328,7 +328,7 @@ public static bool IsContentHeader(string header)
328328
"content-type",
329329
"expires",
330330
"last-modified"
331-
];
331+
};
332332

333333
/// <summary>
334334
/// The base path of the API

samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ public static bool IsContentHeader(string header)
317317
/// The collection of content headers as per
318318
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
319319
/// </summary>
320-
private static readonly string[] ContentHeaders =
321-
[
320+
private static readonly string[] ContentHeaders = new String[]
321+
{
322322
"allow",
323323
"content-encoding",
324324
"content-disposition",
@@ -330,7 +330,7 @@ public static bool IsContentHeader(string header)
330330
"content-type",
331331
"expires",
332332
"last-modified"
333-
];
333+
};
334334

335335
/// <summary>
336336
/// The base path of the API

samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ public static bool IsContentHeader(string header)
315315
/// The collection of content headers as per
316316
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
317317
/// </summary>
318-
private static readonly string[] ContentHeaders =
319-
[
318+
private static readonly string[] ContentHeaders = new String[]
319+
{
320320
"allow",
321321
"content-encoding",
322322
"content-disposition",
@@ -328,7 +328,7 @@ public static bool IsContentHeader(string header)
328328
"content-type",
329329
"expires",
330330
"last-modified"
331-
];
331+
};
332332

333333
/// <summary>
334334
/// The base path of the API

samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ public static bool IsContentHeader(string header)
341341
/// The collection of content headers as per
342342
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
343343
/// </summary>
344-
private static readonly string[] ContentHeaders =
345-
[
344+
private static readonly string[] ContentHeaders = new String[]
345+
{
346346
"allow",
347347
"content-encoding",
348348
"content-disposition",
@@ -354,7 +354,7 @@ public static bool IsContentHeader(string header)
354354
"content-type",
355355
"expires",
356356
"last-modified"
357-
];
357+
};
358358

359359
/// <summary>
360360
/// The base path of the API

samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ public static bool IsContentHeader(string header)
416416
/// The collection of content headers as per
417417
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
418418
/// </summary>
419-
private static readonly string[] ContentHeaders =
420-
[
419+
private static readonly string[] ContentHeaders = new String[]
420+
{
421421
"allow",
422422
"content-encoding",
423423
"content-disposition",
@@ -429,7 +429,7 @@ public static bool IsContentHeader(string header)
429429
"content-type",
430430
"expires",
431431
"last-modified"
432-
];
432+
};
433433

434434
/// <summary>
435435
/// The base path of the API

samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ public static bool IsContentHeader(string header)
330330
/// The collection of content headers as per
331331
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
332332
/// </summary>
333-
private static readonly string[] ContentHeaders =
334-
[
333+
private static readonly string[] ContentHeaders = new String[]
334+
{
335335
"allow",
336336
"content-encoding",
337337
"content-disposition",
@@ -343,7 +343,7 @@ public static bool IsContentHeader(string header)
343343
"content-type",
344344
"expires",
345345
"last-modified"
346-
];
346+
};
347347

348348
/// <summary>
349349
/// The base path of the API

samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ public static bool IsContentHeader(string header)
330330
/// The collection of content headers as per
331331
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
332332
/// </summary>
333-
private static readonly string[] ContentHeaders =
334-
[
333+
private static readonly string[] ContentHeaders = new String[]
334+
{
335335
"allow",
336336
"content-encoding",
337337
"content-disposition",
@@ -343,7 +343,7 @@ public static bool IsContentHeader(string header)
343343
"content-type",
344344
"expires",
345345
"last-modified"
346-
];
346+
};
347347

348348
/// <summary>
349349
/// The base path of the API

samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Client/ClientUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ public static bool IsContentHeader(string header)
315315
/// The collection of content headers as per
316316
/// https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.headers
317317
/// </summary>
318-
private static readonly string[] ContentHeaders =
319-
[
318+
private static readonly string[] ContentHeaders = new String[]
319+
{
320320
"allow",
321321
"content-encoding",
322322
"content-disposition",
@@ -328,7 +328,7 @@ public static bool IsContentHeader(string header)
328328
"content-type",
329329
"expires",
330330
"last-modified"
331-
];
331+
};
332332

333333
/// <summary>
334334
/// The base path of the API

0 commit comments

Comments
 (0)