Skip to content

Commit d57ceb8

Browse files
authored
fix duplicated semi-colon in c# model (#5934)
1 parent 33850a1 commit d57ceb8

File tree

13 files changed

+21
-21
lines changed

13 files changed

+21
-21
lines changed

modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
{{#required}}
6464
{{^vendorExtensions.x-csharp-value-type}}
6565
// to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null)
66-
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");;
66+
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");
6767
{{/vendorExtensions.x-csharp-value-type}}
6868
{{#vendorExtensions.x-csharp-value-type}}
6969
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected Animal() { }
5353
public Animal(string className = default(string), string color = "red")
5454
{
5555
// to ensure "className" is required (not null)
56-
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");;
56+
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");
5757
// use default value if no "color" provided
5858
this.Color = color ?? "red";
5959
}

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected Category() { }
4545
public Category(long id = default(long), string name = "default-name")
4646
{
4747
// to ensure "name" is required (not null)
48-
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");;
48+
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");
4949
this.Id = id;
5050
}
5151

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ protected FormatTest() { }
5858
{
5959
this.Number = number;
6060
// to ensure "_byte" is required (not null)
61-
this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");;
61+
this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");
6262
this.Date = date;
6363
// to ensure "password" is required (not null)
64-
this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");;
64+
this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");
6565
this.Integer = integer;
6666
this.Int32 = int32;
6767
this.Int64 = int64;

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ protected Pet() { }
8282
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?))
8383
{
8484
// to ensure "name" is required (not null)
85-
this.Name = name ?? throw new ArgumentNullException("name is a required property for Pet and cannot be null");;
85+
this.Name = name ?? throw new ArgumentNullException("name is a required property for Pet and cannot be null");
8686
// to ensure "photoUrls" is required (not null)
87-
this.PhotoUrls = photoUrls ?? throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null");;
87+
this.PhotoUrls = photoUrls ?? throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null");
8888
this.Id = id;
8989
this.Category = category;
9090
this.Tags = tags;

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ protected TypeHolderDefault() { }
4848
public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List<int> arrayItem = default(List<int>))
4949
{
5050
// to ensure "stringItem" is required (not null)
51-
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");;
51+
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderDefault and cannot be null");
5252
this.NumberItem = numberItem;
5353
this.IntegerItem = integerItem;
5454
this.BoolItem = boolItem;
5555
// to ensure "arrayItem" is required (not null)
56-
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");;
56+
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderDefault and cannot be null");
5757
}
5858

5959
/// <summary>

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ protected TypeHolderExample() { }
4949
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>))
5050
{
5151
// to ensure "stringItem" is required (not null)
52-
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");;
52+
this.StringItem = stringItem ?? throw new ArgumentNullException("stringItem is a required property for TypeHolderExample and cannot be null");
5353
this.NumberItem = numberItem;
5454
this.FloatItem = floatItem;
5555
this.IntegerItem = integerItem;
5656
this.BoolItem = boolItem;
5757
// to ensure "arrayItem" is required (not null)
58-
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");;
58+
this.ArrayItem = arrayItem ?? throw new ArgumentNullException("arrayItem is a required property for TypeHolderExample and cannot be null");
5959
}
6060

6161
/// <summary>

samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected Animal() { }
5353
public Animal(string className = default(string), string color = "red")
5454
{
5555
// to ensure "className" is required (not null)
56-
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");;
56+
this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null");
5757
// use default value if no "color" provided
5858
this.Color = color ?? "red";
5959
}

samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Category.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected Category() { }
4545
public Category(long id = default(long), string name = "default-name")
4646
{
4747
// to ensure "name" is required (not null)
48-
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");;
48+
this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null");
4949
this.Id = id;
5050
}
5151

samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ protected FormatTest() { }
5858
{
5959
this.Number = number;
6060
// to ensure "_byte" is required (not null)
61-
this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");;
61+
this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null");
6262
this.Date = date;
6363
// to ensure "password" is required (not null)
64-
this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");;
64+
this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");
6565
this.Integer = integer;
6666
this.Int32 = int32;
6767
this.Int64 = int64;

0 commit comments

Comments
 (0)