diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs
index 561197ab9f16..896cb8f12bff 100644
--- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs
@@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new Name();
}
-
+
///
/// Clean up after each test
///
@@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
- }
+ }
///
/// Test an instance of Name
@@ -50,25 +50,22 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf (instance, "instance is a Name");
}
-
///
- /// Test the property '_Name'
+ /// Test the property '_Name'
///
[Test]
public void _NameTest()
{
- // TODO: unit test for the property '_Name'
+ // TODO: unit test for the property '_Name'
}
-
///
- /// Test the property 'SnakeCase'
+ /// Test the property 'SnakeCase'
///
[Test]
public void SnakeCaseTest()
{
- // TODO: unit test for the property 'SnakeCase'
+ // TODO: unit test for the property 'SnakeCase'
}
-
}
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs
index 25ab8f02693d..42299503d2a9 100644
--- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs
@@ -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;
}
///
@@ -451,6 +445,5 @@ namespace IO.Swagger.Client
return filename;
}
}
-
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs
index 9aa1d84a2a81..acbaee1e6880 100644
--- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs
@@ -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";
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs
index 55fd01dfb971..663e9d88e4ce 100644
--- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs
@@ -12,7 +12,7 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model
{
///
- ///
+ /// Model for testing model name same as property name
///
[DataContract]
public partial class Name : IEquatable
@@ -22,16 +22,22 @@ namespace IO.Swagger.Model
/// Initializes a new instance of the class.
/// Initializes a new instance of the class.
///
- /// _Name.
- /// SnakeCase.
+ /// _Name (required).
- public Name(int? _Name = null, int? SnakeCase = null)
+ public Name(int? _Name = null)
{
- this._Name = _Name;
- this.SnakeCase = SnakeCase;
+ // 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;
+ }
}
-
+
///
/// Gets or Sets _Name
@@ -43,7 +49,7 @@ namespace IO.Swagger.Model
/// Gets or Sets SnakeCase
///
[DataMember(Name="snake_case", EmitDefaultValue=false)]
- public int? SnakeCase { get; set; }
+ public int? SnakeCase { get; private set; }
///
/// Returns the string presentation of the object
@@ -54,12 +60,11 @@ 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();
}
-
+
///
/// Returns the JSON string presentation of the object
///
@@ -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;
}
}