fix duplicated semi-colon in c# model (#5934)

This commit is contained in:
William Cheng 2020-04-15 16:28:54 +08:00 committed by GitHub
parent 33850a1312
commit d57ceb86bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 21 additions and 21 deletions

View File

@ -63,7 +63,7 @@
{{#required}} {{#required}}
{{^vendorExtensions.x-csharp-value-type}} {{^vendorExtensions.x-csharp-value-type}}
// to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) // 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}}
{{#vendorExtensions.x-csharp-value-type}} {{#vendorExtensions.x-csharp-value-type}}
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};

View File

@ -53,7 +53,7 @@ namespace Org.OpenAPITools.Model
public Animal(string className = default(string), string color = "red") public Animal(string className = default(string), string color = "red")
{ {
// to ensure "className" is required (not null) // 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 // use default value if no "color" provided
this.Color = color ?? "red"; this.Color = color ?? "red";
} }

View File

@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
public Category(long id = default(long), string name = "default-name") public Category(long id = default(long), string name = "default-name")
{ {
// to ensure "name" is required (not null) // 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; this.Id = id;
} }

View File

@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
{ {
this.Number = number; this.Number = number;
// to ensure "_byte" is required (not null) // 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; this.Date = date;
// to ensure "password" is required (not null) // 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.Integer = integer;
this.Int32 = int32; this.Int32 = int32;
this.Int64 = int64; this.Int64 = int64;

View File

@ -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?)) 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) // 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) // 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.Id = id;
this.Category = category; this.Category = category;
this.Tags = tags; this.Tags = tags;

View File

@ -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>)) 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) // 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.NumberItem = numberItem;
this.IntegerItem = integerItem; this.IntegerItem = integerItem;
this.BoolItem = boolItem; this.BoolItem = boolItem;
// to ensure "arrayItem" is required (not null) // 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> /// <summary>

View File

@ -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>)) 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) // 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.NumberItem = numberItem;
this.FloatItem = floatItem; this.FloatItem = floatItem;
this.IntegerItem = integerItem; this.IntegerItem = integerItem;
this.BoolItem = boolItem; this.BoolItem = boolItem;
// to ensure "arrayItem" is required (not null) // 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> /// <summary>

View File

@ -53,7 +53,7 @@ namespace Org.OpenAPITools.Model
public Animal(string className = default(string), string color = "red") public Animal(string className = default(string), string color = "red")
{ {
// to ensure "className" is required (not null) // 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 // use default value if no "color" provided
this.Color = color ?? "red"; this.Color = color ?? "red";
} }

View File

@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
public Category(long id = default(long), string name = "default-name") public Category(long id = default(long), string name = "default-name")
{ {
// to ensure "name" is required (not null) // 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; this.Id = id;
} }

View File

@ -58,10 +58,10 @@ namespace Org.OpenAPITools.Model
{ {
this.Number = number; this.Number = number;
// to ensure "_byte" is required (not null) // 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; this.Date = date;
// to ensure "password" is required (not null) // 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.Integer = integer;
this.Int32 = int32; this.Int32 = int32;
this.Int64 = int64; this.Int64 = int64;

View File

@ -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?)) 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) // 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) // 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.Id = id;
this.Category = category; this.Category = category;
this.Tags = tags; this.Tags = tags;

View File

@ -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>)) 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) // 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.NumberItem = numberItem;
this.IntegerItem = integerItem; this.IntegerItem = integerItem;
this.BoolItem = boolItem; this.BoolItem = boolItem;
// to ensure "arrayItem" is required (not null) // 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> /// <summary>

View File

@ -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>)) 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) // 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.NumberItem = numberItem;
this.FloatItem = floatItem; this.FloatItem = floatItem;
this.IntegerItem = integerItem; this.IntegerItem = integerItem;
this.BoolItem = boolItem; this.BoolItem = boolItem;
// to ensure "arrayItem" is required (not null) // 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> /// <summary>