Skip to content

Commit b421f5d

Browse files
authored
address comment (#23344)
1 parent c1e0361 commit b421f5d

File tree

1,129 files changed

+3031
-3031
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,129 files changed

+3031
-3031
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
{{#deprecated}}
241241
[Obsolete]
242242
{{/deprecated}}
243-
public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}}
243+
public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option.Value; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}}
244244

245245
{{/isInherited}}
246246
{{/isEnum}}

samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Model/HelloWorldPostRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public HelloWorldPostRequest(Option<string?> message = default)
5454
/// Gets or Sets Message
5555
/// </summary>
5656
[JsonPropertyName("message")]
57-
public string? Message { get { return this.MessageOption; } set { this.MessageOption = new(value); } }
57+
public string? Message { get { return this.MessageOption.Value; } set { this.MessageOption = new(value); } }
5858

5959
/// <summary>
6060
/// Returns the string presentation of the object

samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/Foo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public Foo(Option<string?> bar = default)
5454
/// Gets or Sets Bar
5555
/// </summary>
5656
[JsonPropertyName("bar")]
57-
public string? Bar { get { return this.BarOption; } set { this.BarOption = new(value); } }
57+
public string? Bar { get { return this.BarOption.Value; } set { this.BarOption = new(value); } }
5858

5959
/// <summary>
6060
/// Returns the string presentation of the object

samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/IconsDefaultResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public IconsDefaultResponse(Option<Foo?> @string = default)
5454
/// Gets or Sets String
5555
/// </summary>
5656
[JsonPropertyName("string")]
57-
public Foo? String { get { return this.StringOption; } set { this.StringOption = new(value); } }
57+
public Foo? String { get { return this.StringOption.Value; } set { this.StringOption = new(value); } }
5858

5959
/// <summary>
6060
/// Returns the string presentation of the object

samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/TestObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public TestObject(Option<string?> name = default)
5454
/// Gets or Sets Name
5555
/// </summary>
5656
[JsonPropertyName("name")]
57-
public string? Name { get { return this.NameOption; } set { this.NameOption = new(value); } }
57+
public string? Name { get { return this.NameOption.Value; } set { this.NameOption = new(value); } }
5858

5959
/// <summary>
6060
/// Returns the string presentation of the object

samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Adult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public Adult(Option<List<Child>?> children = default, Option<string?> firstName
5757
/// Gets or Sets Children
5858
/// </summary>
5959
[JsonPropertyName("children")]
60-
public List<Child>? Children { get { return this.ChildrenOption; } set { this.ChildrenOption = new(value); } }
60+
public List<Child>? Children { get { return this.ChildrenOption.Value; } set { this.ChildrenOption = new(value); } }
6161

6262
/// <summary>
6363
/// Returns the string presentation of the object

samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Child.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public Child(Option<int?> age = default, Option<bool?> boosterSeat = default, Op
5959
/// Gets or Sets Age
6060
/// </summary>
6161
[JsonPropertyName("age")]
62-
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new(value); } }
62+
public int? Age { get { return this.AgeOption.Value; } set { this.AgeOption = new(value); } }
6363

6464
/// <summary>
6565
/// Used to track the state of BoosterSeat
@@ -72,7 +72,7 @@ public Child(Option<int?> age = default, Option<bool?> boosterSeat = default, Op
7272
/// Gets or Sets BoosterSeat
7373
/// </summary>
7474
[JsonPropertyName("boosterSeat")]
75-
public bool? BoosterSeat { get { return this.BoosterSeatOption; } set { this.BoosterSeatOption = new(value); } }
75+
public bool? BoosterSeat { get { return this.BoosterSeatOption.Value; } set { this.BoosterSeatOption = new(value); } }
7676

7777
/// <summary>
7878
/// Returns the string presentation of the object

samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Person.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public Person(Option<string?> firstName = default, Option<string?> lastName = de
5858
/// Gets or Sets FirstName
5959
/// </summary>
6060
[JsonPropertyName("firstName")]
61-
public string? FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new(value); } }
61+
public string? FirstName { get { return this.FirstNameOption.Value; } set { this.FirstNameOption = new(value); } }
6262

6363
/// <summary>
6464
/// Used to track the state of LastName
@@ -71,7 +71,7 @@ public Person(Option<string?> firstName = default, Option<string?> lastName = de
7171
/// Gets or Sets LastName
7272
/// </summary>
7373
[JsonPropertyName("lastName")]
74-
public string? LastName { get { return this.LastNameOption; } set { this.LastNameOption = new(value); } }
74+
public string? LastName { get { return this.LastNameOption.Value; } set { this.LastNameOption = new(value); } }
7575

7676
/// <summary>
7777
/// The discriminator

samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Apple.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public Apple(Option<string?> kind = default)
5555
/// Gets or Sets Kind
5656
/// </summary>
5757
[JsonPropertyName("kind")]
58-
public string? Kind { get { return this.KindOption; } set { this.KindOption = new(value); } }
58+
public string? Kind { get { return this.KindOption.Value; } set { this.KindOption = new(value); } }
5959

6060
/// <summary>
6161
/// Gets or Sets additional properties

samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Banana.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public Banana(Option<decimal?> count = default)
5555
/// Gets or Sets Count
5656
/// </summary>
5757
[JsonPropertyName("count")]
58-
public decimal? Count { get { return this.CountOption; } set { this.CountOption = new(value); } }
58+
public decimal? Count { get { return this.CountOption.Value; } set { this.CountOption = new(value); } }
5959

6060
/// <summary>
6161
/// Gets or Sets additional properties

0 commit comments

Comments
 (0)