forked from loafle/openapi-generator-original
add uwp support
This commit is contained in:
@@ -31,7 +31,7 @@ namespace IO.Swagger.Test
|
||||
{
|
||||
instance = new Name();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
@@ -39,7 +39,7 @@ namespace IO.Swagger.Test
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Name
|
||||
@@ -50,22 +50,25 @@ namespace IO.Swagger.Test
|
||||
Assert.IsInstanceOf<Name> (instance, "instance is a Name");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Name'
|
||||
/// Test the property '_Name'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _NameTest()
|
||||
{
|
||||
// TODO: unit test for the property '_Name'
|
||||
// TODO: unit test for the property '_Name'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SnakeCase'
|
||||
/// Test the property 'SnakeCase'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void SnakeCaseTest()
|
||||
{
|
||||
// TODO: unit test for the property 'SnakeCase'
|
||||
// TODO: unit test for the property 'SnakeCase'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,12 @@ namespace IO.Swagger.Client
|
||||
|
||||
// add file parameter, if any
|
||||
foreach(var param in fileParams)
|
||||
{
|
||||
|
||||
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (postBody != null) // http body (model or byte[]) parameter
|
||||
{
|
||||
@@ -148,7 +153,10 @@ namespace IO.Swagger.Client
|
||||
// set user agent
|
||||
RestClient.UserAgent = Configuration.UserAgent;
|
||||
|
||||
|
||||
var response = RestClient.Execute(request);
|
||||
|
||||
|
||||
return (Object) response;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -443,5 +451,6 @@ namespace IO.Swagger.Client
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,11 +270,13 @@ namespace IO.Swagger.Client
|
||||
public static String ToDebugReport()
|
||||
{
|
||||
String report = "C# SDK (IO.Swagger) Debug Report:\n";
|
||||
|
||||
report += " OS: " + Environment.OSVersion + "\n";
|
||||
report += " .NET Framework Version: " + Assembly
|
||||
.GetExecutingAssembly()
|
||||
.GetReferencedAssemblies()
|
||||
.Where(x => x.Name == "System.Core").First().Version.ToString() + "\n";
|
||||
|
||||
report += " Version of the API: 1.0.0\n";
|
||||
report += " SDK Package Version: 1.0.0\n";
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ using Newtonsoft.Json.Converters;
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for testing model name same as property name
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Name : IEquatable<Name>
|
||||
@@ -22,22 +22,16 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="Name" /> class.
|
||||
/// Initializes a new instance of the <see cref="Name" />class.
|
||||
/// </summary>
|
||||
/// <param name="_Name">_Name (required).</param>
|
||||
/// <param name="_Name">_Name.</param>
|
||||
/// <param name="SnakeCase">SnakeCase.</param>
|
||||
|
||||
public Name(int? _Name = null)
|
||||
public Name(int? _Name = null, int? SnakeCase = null)
|
||||
{
|
||||
// to ensure "_Name" is required (not null)
|
||||
if (_Name == null)
|
||||
{
|
||||
throw new InvalidDataException("_Name is a required property for Name and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this._Name = _Name;
|
||||
}
|
||||
this._Name = _Name;
|
||||
this.SnakeCase = SnakeCase;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Name
|
||||
@@ -49,7 +43,7 @@ namespace IO.Swagger.Model
|
||||
/// Gets or Sets SnakeCase
|
||||
/// </summary>
|
||||
[DataMember(Name="snake_case", EmitDefaultValue=false)]
|
||||
public int? SnakeCase { get; private set; }
|
||||
public int? SnakeCase { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@@ -60,11 +54,12 @@ namespace IO.Swagger.Model
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Name {\n");
|
||||
sb.Append(" _Name: ").Append(_Name).Append("\n");
|
||||
sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n");
|
||||
sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n");
|
||||
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
@@ -120,10 +115,13 @@ sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n");
|
||||
{
|
||||
int hash = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
|
||||
if (this._Name != null)
|
||||
hash = hash * 59 + this._Name.GetHashCode();
|
||||
|
||||
if (this.SnakeCase != null)
|
||||
hash = hash * 59 + this.SnakeCase.GetHashCode();
|
||||
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<Properties StartupItem="SwaggerClientTest.csproj">
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs">
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
|
||||
<Files>
|
||||
<File FileName="TestPet.cs" Line="1" Column="1" />
|
||||
<File FileName="TestPet.cs" Line="222" Column="29" />
|
||||
<File FileName="TestOrder.cs" Line="1" Column="1" />
|
||||
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs" Line="1" Column="1" />
|
||||
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs" Line="18" Column="50" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
|
||||
Reference in New Issue
Block a user