forked from loafle/openapi-generator-original
Merge branch 'cs/req_properties_2584' of https://github.com/jimschubert/swagger-codegen into jimschubert-cs/req_properties_2584
Conflicts: samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln samples/client/petstore/csharp/SwaggerClient/README.md samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj
This commit is contained in:
@@ -18,6 +18,11 @@ namespace IO.Swagger.Client
|
||||
/// </summary>
|
||||
public class ApiClient
|
||||
{
|
||||
private JsonSerializerSettings serializerSettings = new JsonSerializerSettings
|
||||
{
|
||||
ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient" /> class
|
||||
/// with default configuration and base path (http://petstore.swagger.io/v2).
|
||||
@@ -289,7 +294,7 @@ namespace IO.Swagger.Client
|
||||
// at this point, it must be a model (json)
|
||||
try
|
||||
{
|
||||
return JsonConvert.DeserializeObject(response.Content, type);
|
||||
return JsonConvert.DeserializeObject(response.Content, type, serializerSettings);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace IO.Swagger.Model
|
||||
[DataContract]
|
||||
public partial class Animal : IEquatable<Animal>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Animal" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Animal() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Animal" /> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace IO.Swagger.Model
|
||||
[DataContract]
|
||||
public partial class Cat : Animal, IEquatable<Cat>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Cat" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Cat() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Cat" /> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace IO.Swagger.Model
|
||||
[DataContract]
|
||||
public partial class Dog : Animal, IEquatable<Dog>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Dog" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Dog() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Dog" /> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace IO.Swagger.Model
|
||||
[DataContract]
|
||||
public partial class FormatTest : IEquatable<FormatTest>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected FormatTest() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace IO.Swagger.Model
|
||||
[DataContract]
|
||||
public partial class Name : IEquatable<Name>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Name" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Name() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Name" /> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -53,6 +53,11 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Pet" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Pet() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Pet" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Id">Id.</param>
|
||||
/// <param name="Category">Category.</param>
|
||||
/// <param name="Name">Name (required).</param>
|
||||
|
||||
Reference in New Issue
Block a user