forked from loafle/openapi-generator-original
Compare commits
1 Commits
master
...
devhl-labs
Author | SHA1 | Date | |
---|---|---|---|
|
a4a853430e |
@ -2,6 +2,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -111,8 +112,12 @@ namespace {{packageName}}.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);
|
||||
|
||||
|
@ -6,10 +6,13 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;{{#useCompareNetObjects}}
|
||||
using KellermanSoftware.CompareNetObjects;{{/useCompareNetObjects}}
|
||||
using {{packageName}}.{{modelPackage}};
|
||||
|
||||
namespace {{packageName}}.{{clientPackage}}
|
||||
{
|
||||
@ -120,9 +123,45 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
// For example: 2009-06-15T13:45:30.0000000
|
||||
return dateTimeOffset.ToString(format);
|
||||
if (obj is bool boolean)
|
||||
return boolean ? "true" : "false";
|
||||
if (obj is System.Collections.ICollection collection)
|
||||
return string.Join(",", collection.Cast<object>());
|
||||
return boolean
|
||||
? "true"
|
||||
: "false";
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
{{#isEnum}}
|
||||
if (obj is {{classname}} {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}})
|
||||
{{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}}
|
||||
return {{classname}}Converter.{{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}){{#isNumeric}}.ToString(){{/isNumeric}};
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{#vars}}
|
||||
{{#items.isEnum}}
|
||||
{{#items}}
|
||||
{{^complexType}}
|
||||
if (obj is {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}} {{#lambda.camelcase_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_param}})
|
||||
{{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}}
|
||||
return {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_param}}){{#isNumeric}}.ToString(){{/isNumeric}};
|
||||
{{/complexType}}
|
||||
{{/items}}
|
||||
{{/items.isEnum}}
|
||||
{{#isEnum}}
|
||||
{{^complexType}}
|
||||
if (obj is {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}} {{#lambda.camelcase_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_param}})
|
||||
{{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}}
|
||||
return {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_param}}){{#isNumeric}}.ToString(){{/isNumeric}};
|
||||
{{/complexType}}
|
||||
{{/isEnum}}
|
||||
{{/vars}}
|
||||
{{/isEnum}}
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
if (obj is ICollection collection)
|
||||
{
|
||||
List<string{{nrt?}}> entries = new List<string{{nrt?}}>();
|
||||
foreach (var entry in collection)
|
||||
entries.Add(ParameterToString(entry));
|
||||
return string.Join(",", entries);
|
||||
}
|
||||
|
||||
return Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}})
|
||||
return {{^isNumeric}}"{{/isNumeric}}{{value}}{{^isNumeric}}"{{/isNumeric}};
|
||||
return {{^isNumeric}}"{{/isNumeric}}{{{value}}}{{^isNumeric}}"{{/isNumeric}};
|
||||
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
|
@ -66,7 +66,7 @@
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}})
|
||||
return {{^isNumeric}}"{{/isNumeric}}{{value}}{{^isNumeric}}"{{/isNumeric}};
|
||||
return {{^isNumeric}}"{{/isNumeric}}{{{value}}}{{^isNumeric}}"{{/isNumeric}};
|
||||
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -60,5 +60,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
var response = await _instance.FooGetAsync();
|
||||
Assert.IsType<FooGetDefaultResponse>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test GetCountry
|
||||
/// </summary>
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task GetCountryAsyncTest()
|
||||
{
|
||||
string country = default;
|
||||
await _instance.GetCountryAsync(country);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test Hello
|
||||
/// </summary>
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task HelloAsyncTest()
|
||||
{
|
||||
var response = await _instance.HelloAsync();
|
||||
Assert.IsType<List<Guid>>(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
@ -176,6 +175,22 @@ namespace Org.OpenAPITools.Test.Model
|
||||
// TODO unit test for the property 'StringProperty'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'UnsignedInteger'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UnsignedIntegerTest()
|
||||
{
|
||||
// TODO unit test for the property 'UnsignedInteger'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'UnsignedLong'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UnsignedLongTest()
|
||||
{
|
||||
// TODO unit test for the property 'UnsignedLong'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
@ -79,6 +78,14 @@ namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'UuidWithPattern'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidWithPatternTest()
|
||||
{
|
||||
// TODO unit test for the property 'UuidWithPattern'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -12,10 +12,13 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using KellermanSoftware.CompareNetObjects;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -124,9 +127,50 @@ namespace Org.OpenAPITools.Client
|
||||
// For example: 2009-06-15T13:45:30.0000000
|
||||
return dateTimeOffset.ToString(format);
|
||||
if (obj is bool boolean)
|
||||
return boolean ? "true" : "false";
|
||||
if (obj is System.Collections.ICollection collection)
|
||||
return string.Join(",", collection.Cast<object>());
|
||||
return boolean
|
||||
? "true"
|
||||
: "false";
|
||||
if (obj is ChildCatAllOf.PetTypeEnum childCatAllOfPetTypeEnum)
|
||||
return ChildCatAllOf.PetTypeEnumToJsonValue(childCatAllOfPetTypeEnum);
|
||||
if (obj is EnumArrays.ArrayEnumEnum enumArraysArrayEnumEnum)
|
||||
return EnumArrays.ArrayEnumEnumToJsonValue(enumArraysArrayEnumEnum);
|
||||
if (obj is EnumArrays.JustSymbolEnum enumArraysJustSymbolEnum)
|
||||
return EnumArrays.JustSymbolEnumToJsonValue(enumArraysJustSymbolEnum);
|
||||
if (obj is EnumClass enumClass)
|
||||
return EnumClassConverter.ToJsonValue(enumClass);
|
||||
if (obj is EnumTest.EnumIntegerEnum enumTestEnumIntegerEnum)
|
||||
return EnumTest.EnumIntegerEnumToJsonValue(enumTestEnumIntegerEnum).ToString();
|
||||
if (obj is EnumTest.EnumIntegerOnlyEnum enumTestEnumIntegerOnlyEnum)
|
||||
return EnumTest.EnumIntegerOnlyEnumToJsonValue(enumTestEnumIntegerOnlyEnum).ToString();
|
||||
if (obj is EnumTest.EnumNumberEnum enumTestEnumNumberEnum)
|
||||
return EnumTest.EnumNumberEnumToJsonValue(enumTestEnumNumberEnum).ToString();
|
||||
if (obj is EnumTest.EnumStringEnum enumTestEnumStringEnum)
|
||||
return EnumTest.EnumStringEnumToJsonValue(enumTestEnumStringEnum);
|
||||
if (obj is EnumTest.EnumStringRequiredEnum enumTestEnumStringRequiredEnum)
|
||||
return EnumTest.EnumStringRequiredEnumToJsonValue(enumTestEnumStringRequiredEnum);
|
||||
if (obj is MapTest.InnerEnum mapTestInnerEnum)
|
||||
return MapTest.InnerEnumToJsonValue(mapTestInnerEnum);
|
||||
if (obj is Order.StatusEnum orderStatusEnum)
|
||||
return Order.StatusEnumToJsonValue(orderStatusEnum);
|
||||
if (obj is OuterEnum outerEnum)
|
||||
return OuterEnumConverter.ToJsonValue(outerEnum);
|
||||
if (obj is OuterEnumDefaultValue outerEnumDefaultValue)
|
||||
return OuterEnumDefaultValueConverter.ToJsonValue(outerEnumDefaultValue);
|
||||
if (obj is OuterEnumInteger outerEnumInteger)
|
||||
return OuterEnumIntegerConverter.ToJsonValue(outerEnumInteger).ToString();
|
||||
if (obj is OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue)
|
||||
return OuterEnumIntegerDefaultValueConverter.ToJsonValue(outerEnumIntegerDefaultValue).ToString();
|
||||
if (obj is Pet.StatusEnum petStatusEnum)
|
||||
return Pet.StatusEnumToJsonValue(petStatusEnum);
|
||||
if (obj is Zebra.TypeEnum zebraTypeEnum)
|
||||
return Zebra.TypeEnumToJsonValue(zebraTypeEnum);
|
||||
if (obj is ICollection collection)
|
||||
{
|
||||
List<string?> entries = new List<string?>();
|
||||
foreach (var entry in collection)
|
||||
entries.Add(ParameterToString(entry));
|
||||
return string.Join(",", entries);
|
||||
}
|
||||
|
||||
return Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ namespace Org.OpenAPITools.Model
|
||||
public static string JustSymbolEnumToJsonValue(JustSymbolEnum value)
|
||||
{
|
||||
if (value == JustSymbolEnum.GreaterThanOrEqualTo)
|
||||
return ">=";
|
||||
return ">=";
|
||||
|
||||
if (value == JustSymbolEnum.Dollar)
|
||||
return "$";
|
||||
|
@ -60,5 +60,25 @@ namespace Org.OpenAPITools.Test.Api
|
||||
var response = await _instance.FooGetAsync();
|
||||
Assert.IsType<FooGetDefaultResponse>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test GetCountry
|
||||
/// </summary>
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task GetCountryAsyncTest()
|
||||
{
|
||||
string country = default;
|
||||
await _instance.GetCountryAsync(country);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test Hello
|
||||
/// </summary>
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task HelloAsyncTest()
|
||||
{
|
||||
var response = await _instance.HelloAsync();
|
||||
Assert.IsType<List<Guid>>(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
@ -14,7 +14,6 @@ using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user