forked from loafle/openapi-generator-original
better handling of form parameters (#15040)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -115,8 +116,12 @@ namespace Org.OpenAPITools.Client
|
||||
return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
|
||||
if (obj is bool boolean)
|
||||
return boolean ? "true" : "false";
|
||||
if (obj is ICollection collection)
|
||||
return string.Join(",", collection.Cast<object>());
|
||||
if (obj is ICollection collection) {
|
||||
List<string> entries = new List<string>();
|
||||
foreach (var entry in collection)
|
||||
entries.Add(ParameterToString(entry, configuration));
|
||||
return string.Join(",", entries);
|
||||
}
|
||||
if (obj is Enum && HasEnumMemberAttrValue(obj))
|
||||
return GetEnumMemberAttrValue(obj);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user