forked from loafle/openapi-generator-original
update sample
This commit is contained in:
@@ -50,7 +50,6 @@ namespace IO.Swagger.Test
|
||||
Assert.IsInstanceOf<Name> (instance, "instance is a Name");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Name'
|
||||
/// </summary>
|
||||
@@ -59,7 +58,6 @@ namespace IO.Swagger.Test
|
||||
{
|
||||
// TODO: unit test for the property '_Name'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'SnakeCase'
|
||||
/// </summary>
|
||||
@@ -69,7 +67,6 @@ namespace IO.Swagger.Test
|
||||
// TODO: unit test for the property 'SnakeCase'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -104,10 +104,7 @@ 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
|
||||
@@ -153,10 +150,7 @@ namespace IO.Swagger.Client
|
||||
// set user agent
|
||||
RestClient.UserAgent = Configuration.UserAgent;
|
||||
|
||||
|
||||
var response = RestClient.Execute(request);
|
||||
|
||||
|
||||
return (Object) response;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -451,6 +445,5 @@ namespace IO.Swagger.Client
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,13 +270,11 @@ 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,13 +22,19 @@ 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.</param>
|
||||
/// <param name="SnakeCase">SnakeCase.</param>
|
||||
/// <param name="_Name">_Name (required).</param>
|
||||
|
||||
public Name(int? _Name = null, int? SnakeCase = null)
|
||||
public Name(int? _Name = 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.SnakeCase = SnakeCase;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +49,7 @@ namespace IO.Swagger.Model
|
||||
/// Gets or Sets SnakeCase
|
||||
/// </summary>
|
||||
[DataMember(Name="snake_case", EmitDefaultValue=false)]
|
||||
public int? SnakeCase { get; set; }
|
||||
public int? SnakeCase { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@@ -54,8 +60,7 @@ 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();
|
||||
}
|
||||
@@ -115,13 +120,10 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user