Skip to content

Commit 9653267

Browse files
committed
regenerate samples
1 parent ec6437d commit 9653267

363 files changed

Lines changed: 3438 additions & 149 deletions

File tree

Some content is hidden

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

bin/configs/csharp-generichost-net4.8-useDateTimeForDate.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ additionalProperties:
99
targetFramework: net48
1010
modelPropertySorting: alphabetical
1111
operationParameterSorting: alphabetical
12+
disallowAdditionalPropertiesIfNotPresent: true

bin/configs/csharp-unityWebRequest-net9.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ library: unityWebRequest
77
additionalProperties:
88
targetFramework: net9.0
99
equatable: true
10+
disallowAdditionalPropertiesIfNotPresent: true

samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Model/Bird.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public Bird(string size = default, string color = default)
4141
{
4242
this.Size = size;
4343
this.Color = color;
44+
this.AdditionalProperties = new Dictionary<string, object>();
4445
}
4546

4647
/// <summary>
@@ -55,6 +56,12 @@ public Bird(string size = default, string color = default)
5556
[DataMember(Name = "color", EmitDefaultValue = false)]
5657
public string Color { get; set; }
5758

59+
/// <summary>
60+
/// Gets or Sets additional properties
61+
/// </summary>
62+
[JsonExtensionData]
63+
public IDictionary<string, object> AdditionalProperties { get; set; }
64+
5865
/// <summary>
5966
/// Returns the string presentation of the object
6067
/// </summary>
@@ -65,6 +72,7 @@ public override string ToString()
6572
sb.Append("class Bird {\n");
6673
sb.Append(" Size: ").Append(Size).Append("\n");
6774
sb.Append(" Color: ").Append(Color).Append("\n");
75+
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
6876
sb.Append("}\n");
6977
return sb.ToString();
7078
}
@@ -109,7 +117,8 @@ public bool Equals(Bird input)
109117
this.Color == input.Color ||
110118
(this.Color != null &&
111119
this.Color.Equals(input.Color))
112-
);
120+
)
121+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
113122
}
114123

115124
/// <summary>
@@ -129,6 +138,10 @@ public override int GetHashCode()
129138
{
130139
hashCode = (hashCode * 59) + this.Color.GetHashCode();
131140
}
141+
if (this.AdditionalProperties != null)
142+
{
143+
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
144+
}
132145
return hashCode;
133146
}
134147
}

samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Model/Category.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public Category(long id = default, string name = default)
4141
{
4242
this.Id = id;
4343
this.Name = name;
44+
this.AdditionalProperties = new Dictionary<string, object>();
4445
}
4546

4647
/// <summary>
@@ -61,6 +62,12 @@ public Category(long id = default, string name = default)
6162
[DataMember(Name = "name", EmitDefaultValue = false)]
6263
public string Name { get; set; }
6364

65+
/// <summary>
66+
/// Gets or Sets additional properties
67+
/// </summary>
68+
[JsonExtensionData]
69+
public IDictionary<string, object> AdditionalProperties { get; set; }
70+
6471
/// <summary>
6572
/// Returns the string presentation of the object
6673
/// </summary>
@@ -71,6 +78,7 @@ public override string ToString()
7178
sb.Append("class Category {\n");
7279
sb.Append(" Id: ").Append(Id).Append("\n");
7380
sb.Append(" Name: ").Append(Name).Append("\n");
81+
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
7482
sb.Append("}\n");
7583
return sb.ToString();
7684
}
@@ -114,7 +122,8 @@ public bool Equals(Category input)
114122
this.Name == input.Name ||
115123
(this.Name != null &&
116124
this.Name.Equals(input.Name))
117-
);
125+
)
126+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
118127
}
119128

120129
/// <summary>
@@ -131,6 +140,10 @@ public override int GetHashCode()
131140
{
132141
hashCode = (hashCode * 59) + this.Name.GetHashCode();
133142
}
143+
if (this.AdditionalProperties != null)
144+
{
145+
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
146+
}
134147
return hashCode;
135148
}
136149
}

samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Model/DataQuery.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public DataQuery(string suffix = default, string text = default, DateTime date =
4545
this.Suffix = suffix;
4646
this.Text = text;
4747
this.Date = date;
48+
this.AdditionalProperties = new Dictionary<string, object>();
4849
}
4950

5051
/// <summary>
@@ -71,6 +72,12 @@ public DataQuery(string suffix = default, string text = default, DateTime date =
7172
[DataMember(Name = "date", EmitDefaultValue = false)]
7273
public DateTime Date { get; set; }
7374

75+
/// <summary>
76+
/// Gets or Sets additional properties
77+
/// </summary>
78+
[JsonExtensionData]
79+
public IDictionary<string, object> AdditionalProperties { get; set; }
80+
7481
/// <summary>
7582
/// Returns the string presentation of the object
7683
/// </summary>
@@ -83,6 +90,7 @@ public override string ToString()
8390
sb.Append(" Suffix: ").Append(Suffix).Append("\n");
8491
sb.Append(" Text: ").Append(Text).Append("\n");
8592
sb.Append(" Date: ").Append(Date).Append("\n");
93+
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
8694
sb.Append("}\n");
8795
return sb.ToString();
8896
}
@@ -132,7 +140,8 @@ public bool Equals(DataQuery input)
132140
this.Date == input.Date ||
133141
(this.Date != null &&
134142
this.Date.Equals(input.Date))
135-
);
143+
)
144+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
136145
}
137146

138147
/// <summary>
@@ -156,6 +165,10 @@ public override int GetHashCode()
156165
{
157166
hashCode = (hashCode * 59) + this.Date.GetHashCode();
158167
}
168+
if (this.AdditionalProperties != null)
169+
{
170+
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
171+
}
159172
return hashCode;
160173
}
161174
}

samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Model/DefaultValue.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public DefaultValue(List<StringEnumRef> arrayStringEnumRefDefault = default, Lis
7878
this.ArrayStringNullable = arrayStringNullable;
7979
this.ArrayStringExtensionNullable = arrayStringExtensionNullable;
8080
this.StringNullable = stringNullable;
81+
this.AdditionalProperties = new Dictionary<string, object>();
8182
}
8283

8384
/// <summary>
@@ -128,6 +129,12 @@ public DefaultValue(List<StringEnumRef> arrayStringEnumRefDefault = default, Lis
128129
[DataMember(Name = "string_nullable", EmitDefaultValue = true)]
129130
public string StringNullable { get; set; }
130131

132+
/// <summary>
133+
/// Gets or Sets additional properties
134+
/// </summary>
135+
[JsonExtensionData]
136+
public IDictionary<string, object> AdditionalProperties { get; set; }
137+
131138
/// <summary>
132139
/// Returns the string presentation of the object
133140
/// </summary>
@@ -144,6 +151,7 @@ public override string ToString()
144151
sb.Append(" ArrayStringNullable: ").Append(ArrayStringNullable).Append("\n");
145152
sb.Append(" ArrayStringExtensionNullable: ").Append(ArrayStringExtensionNullable).Append("\n");
146153
sb.Append(" StringNullable: ").Append(StringNullable).Append("\n");
154+
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
147155
sb.Append("}\n");
148156
return sb.ToString();
149157
}
@@ -225,7 +233,8 @@ public bool Equals(DefaultValue input)
225233
this.StringNullable == input.StringNullable ||
226234
(this.StringNullable != null &&
227235
this.StringNullable.Equals(input.StringNullable))
228-
);
236+
)
237+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
229238
}
230239

231240
/// <summary>
@@ -269,6 +278,10 @@ public override int GetHashCode()
269278
{
270279
hashCode = (hashCode * 59) + this.StringNullable.GetHashCode();
271280
}
281+
if (this.AdditionalProperties != null)
282+
{
283+
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
284+
}
272285
return hashCode;
273286
}
274287
}

samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public NumberPropertiesOnly(decimal number = default, float varFloat = default,
4343
this.Number = number;
4444
this.Float = varFloat;
4545
this.Double = varDouble;
46+
this.AdditionalProperties = new Dictionary<string, object>();
4647
}
4748

4849
/// <summary>
@@ -63,6 +64,12 @@ public NumberPropertiesOnly(decimal number = default, float varFloat = default,
6364
[DataMember(Name = "double", EmitDefaultValue = false)]
6465
public double Double { get; set; }
6566

67+
/// <summary>
68+
/// Gets or Sets additional properties
69+
/// </summary>
70+
[JsonExtensionData]
71+
public IDictionary<string, object> AdditionalProperties { get; set; }
72+
6673
/// <summary>
6774
/// Returns the string presentation of the object
6875
/// </summary>
@@ -74,6 +81,7 @@ public override string ToString()
7481
sb.Append(" Number: ").Append(Number).Append("\n");
7582
sb.Append(" Float: ").Append(Float).Append("\n");
7683
sb.Append(" Double: ").Append(Double).Append("\n");
84+
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
7785
sb.Append("}\n");
7886
return sb.ToString();
7987
}
@@ -120,7 +128,8 @@ public bool Equals(NumberPropertiesOnly input)
120128
(
121129
this.Double == input.Double ||
122130
this.Double.Equals(input.Double)
123-
);
131+
)
132+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
124133
}
125134

126135
/// <summary>
@@ -135,6 +144,10 @@ public override int GetHashCode()
135144
hashCode = (hashCode * 59) + this.Number.GetHashCode();
136145
hashCode = (hashCode * 59) + this.Float.GetHashCode();
137146
hashCode = (hashCode * 59) + this.Double.GetHashCode();
147+
if (this.AdditionalProperties != null)
148+
{
149+
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
150+
}
138151
return hashCode;
139152
}
140153
}

samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Model/Pet.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ public enum StatusEnum
6969
/// Initializes a new instance of the <see cref="Pet" /> class.
7070
/// </summary>
7171
[JsonConstructorAttribute]
72-
protected Pet() { }
72+
protected Pet()
73+
{
74+
this.AdditionalProperties = new Dictionary<string, object>();
75+
}
7376
/// <summary>
7477
/// Initializes a new instance of the <see cref="Pet" /> class.
7578
/// </summary>
@@ -97,6 +100,7 @@ public Pet(long id = default, string name = default, Category category = default
97100
this.Category = category;
98101
this.Tags = tags;
99102
this.Status = status;
103+
this.AdditionalProperties = new Dictionary<string, object>();
100104
}
101105

102106
/// <summary>
@@ -135,6 +139,12 @@ public Pet(long id = default, string name = default, Category category = default
135139
[DataMember(Name = "tags", EmitDefaultValue = false)]
136140
public List<Tag> Tags { get; set; }
137141

142+
/// <summary>
143+
/// Gets or Sets additional properties
144+
/// </summary>
145+
[JsonExtensionData]
146+
public IDictionary<string, object> AdditionalProperties { get; set; }
147+
138148
/// <summary>
139149
/// Returns the string presentation of the object
140150
/// </summary>
@@ -149,6 +159,7 @@ public override string ToString()
149159
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
150160
sb.Append(" Tags: ").Append(Tags).Append("\n");
151161
sb.Append(" Status: ").Append(Status).Append("\n");
162+
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
152163
sb.Append("}\n");
153164
return sb.ToString();
154165
}
@@ -213,7 +224,8 @@ public bool Equals(Pet input)
213224
(
214225
this.Status == input.Status ||
215226
this.Status.Equals(input.Status)
216-
);
227+
)
228+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
217229
}
218230

219231
/// <summary>
@@ -243,6 +255,10 @@ public override int GetHashCode()
243255
hashCode = (hashCode * 59) + this.Tags.GetHashCode();
244256
}
245257
hashCode = (hashCode * 59) + this.Status.GetHashCode();
258+
if (this.AdditionalProperties != null)
259+
{
260+
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
261+
}
246262
return hashCode;
247263
}
248264
}

samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Model/Query.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public Query(long id = default, List<OutcomesEnum> outcomes = default)
6666
{
6767
this.Id = id;
6868
this.Outcomes = outcomes;
69+
this.AdditionalProperties = new Dictionary<string, object>();
6970
}
7071

7172
/// <summary>
@@ -81,6 +82,12 @@ public Query(long id = default, List<OutcomesEnum> outcomes = default)
8182
[DataMember(Name = "outcomes", EmitDefaultValue = false)]
8283
public List<Query.OutcomesEnum> Outcomes { get; set; }
8384

85+
/// <summary>
86+
/// Gets or Sets additional properties
87+
/// </summary>
88+
[JsonExtensionData]
89+
public IDictionary<string, object> AdditionalProperties { get; set; }
90+
8491
/// <summary>
8592
/// Returns the string presentation of the object
8693
/// </summary>
@@ -91,6 +98,7 @@ public override string ToString()
9198
sb.Append("class Query {\n");
9299
sb.Append(" Id: ").Append(Id).Append("\n");
93100
sb.Append(" Outcomes: ").Append(Outcomes).Append("\n");
101+
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
94102
sb.Append("}\n");
95103
return sb.ToString();
96104
}
@@ -135,7 +143,8 @@ public bool Equals(Query input)
135143
this.Outcomes != null &&
136144
input.Outcomes != null &&
137145
this.Outcomes.SequenceEqual(input.Outcomes)
138-
);
146+
)
147+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
139148
}
140149

141150
/// <summary>
@@ -152,6 +161,10 @@ public override int GetHashCode()
152161
{
153162
hashCode = (hashCode * 59) + this.Outcomes.GetHashCode();
154163
}
164+
if (this.AdditionalProperties != null)
165+
{
166+
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
167+
}
155168
return hashCode;
156169
}
157170
}

0 commit comments

Comments
 (0)