forked from loafle/openapi-generator-original
fix duplicated semi-colon in c# model (#5934)
This commit is contained in:
parent
33850a1312
commit
d57ceb86bf
@ -63,7 +63,7 @@
|
||||
{{#required}}
|
||||
{{^vendorExtensions.x-csharp-value-type}}
|
||||
// to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null)
|
||||
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} ?? throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null");;
|
||||
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} ?? throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null");
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{#vendorExtensions.x-csharp-value-type}}
|
||||
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
|
@ -53,7 +53,7 @@ namespace Org.OpenAPITools.Model
|
||||
public Animal(string className = default(string), string color = "red")
|
||||
{
|
||||
// to ensure "className" is required (not null)
|
||||
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");;
|
||||
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");
|
||||
// use default value if no "color" provided
|
||||
this.Color = color ?? "red";
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
|
||||
public Category(long id = default(long), string name = "default-name")
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");;
|
||||
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");
|
||||
this.Id = id;
|
||||
}
|
||||
|
||||
|
@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
this.Number = number;
|
||||
// to ensure "_byte" is required (not null)
|
||||
this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");;
|
||||
this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");
|
||||
this.Date = date;
|
||||
// to ensure "password" is required (not null)
|
||||
this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");;
|
||||
this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");
|
||||
this.Integer = integer;
|
||||
this.Int32 = int32;
|
||||
this.Int64 = int64;
|
||||
|
@ -82,9 +82,9 @@ namespace Org.OpenAPITools.Model
|
||||
public Pet(long id = default(long), Category category = default(Category), string name = default(string), List<string> photoUrls = default(List<string>), List<Tag> tags = default(List<Tag>), StatusEnum? status = default(StatusEnum?))
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
this.Name = name ?? throw new ArgumentNullException("name is a required property for Pet and cannot be null");;
|
||||
this.Name = name ?? throw new ArgumentNullException("name is a required property for Pet and cannot be null");
|
||||
// to ensure "photoUrls" is required (not null)
|
||||
this.PhotoUrls = photoUrls ?? throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null");;
|
||||
this.PhotoUrls = photoUrls ?? throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null");
|
||||
this.Id = id;
|
||||
this.Category = category;
|
||||
this.Tags = tags;
|
||||
|
@ -48,12 +48,12 @@ namespace Org.OpenAPITools.Model
|
||||
public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List<int> arrayItem = default(List<int>))
|
||||
{
|
||||
// to ensure "stringItem" is required (not null)
|
||||
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");;
|
||||
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");
|
||||
this.NumberItem = numberItem;
|
||||
this.IntegerItem = integerItem;
|
||||
this.BoolItem = boolItem;
|
||||
// to ensure "arrayItem" is required (not null)
|
||||
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");;
|
||||
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model
|
||||
public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List<int> arrayItem = default(List<int>))
|
||||
{
|
||||
// to ensure "stringItem" is required (not null)
|
||||
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");;
|
||||
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");
|
||||
this.NumberItem = numberItem;
|
||||
this.FloatItem = floatItem;
|
||||
this.IntegerItem = integerItem;
|
||||
this.BoolItem = boolItem;
|
||||
// to ensure "arrayItem" is required (not null)
|
||||
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");;
|
||||
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -53,7 +53,7 @@ namespace Org.OpenAPITools.Model
|
||||
public Animal(string className = default(string), string color = "red")
|
||||
{
|
||||
// to ensure "className" is required (not null)
|
||||
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");;
|
||||
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");
|
||||
// use default value if no "color" provided
|
||||
this.Color = color ?? "red";
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
|
||||
public Category(long id = default(long), string name = "default-name")
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");;
|
||||
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");
|
||||
this.Id = id;
|
||||
}
|
||||
|
||||
|
@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
this.Number = number;
|
||||
// to ensure "_byte" is required (not null)
|
||||
this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");;
|
||||
this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");
|
||||
this.Date = date;
|
||||
// to ensure "password" is required (not null)
|
||||
this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");;
|
||||
this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");
|
||||
this.Integer = integer;
|
||||
this.Int32 = int32;
|
||||
this.Int64 = int64;
|
||||
|
@ -82,9 +82,9 @@ namespace Org.OpenAPITools.Model
|
||||
public Pet(long id = default(long), Category category = default(Category), string name = default(string), List<string> photoUrls = default(List<string>), List<Tag> tags = default(List<Tag>), StatusEnum? status = default(StatusEnum?))
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
this.Name = name ?? throw new ArgumentNullException("name is a required property for Pet and cannot be null");;
|
||||
this.Name = name ?? throw new ArgumentNullException("name is a required property for Pet and cannot be null");
|
||||
// to ensure "photoUrls" is required (not null)
|
||||
this.PhotoUrls = photoUrls ?? throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null");;
|
||||
this.PhotoUrls = photoUrls ?? throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null");
|
||||
this.Id = id;
|
||||
this.Category = category;
|
||||
this.Tags = tags;
|
||||
|
@ -48,12 +48,12 @@ namespace Org.OpenAPITools.Model
|
||||
public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List<int> arrayItem = default(List<int>))
|
||||
{
|
||||
// to ensure "stringItem" is required (not null)
|
||||
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");;
|
||||
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");
|
||||
this.NumberItem = numberItem;
|
||||
this.IntegerItem = integerItem;
|
||||
this.BoolItem = boolItem;
|
||||
// to ensure "arrayItem" is required (not null)
|
||||
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");;
|
||||
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model
|
||||
public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List<int> arrayItem = default(List<int>))
|
||||
{
|
||||
// to ensure "stringItem" is required (not null)
|
||||
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");;
|
||||
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");
|
||||
this.NumberItem = numberItem;
|
||||
this.FloatItem = floatItem;
|
||||
this.IntegerItem = integerItem;
|
||||
this.BoolItem = boolItem;
|
||||
// to ensure "arrayItem" is required (not null)
|
||||
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");;
|
||||
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user