Skip to content

Commit d731acf

Browse files
committed
regenerate samples
1 parent 8e20197 commit d731acf

424 files changed

Lines changed: 0 additions & 5127 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.

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ public override HelloWorldPostRequest Read(ref Utf8JsonReader utf8JsonReader, Ty
128128
}
129129
}
130130

131-
if (message.IsSet && message.Value == null)
132-
throw new ArgumentNullException(nameof(message), "Property is not nullable for class HelloWorldPostRequest.");
133-
134131
return new HelloWorldPostRequest(message);
135132
}
136133

@@ -158,9 +155,6 @@ public override void Write(Utf8JsonWriter writer, HelloWorldPostRequest helloWor
158155
/// <exception cref="NotImplementedException"></exception>
159156
public void WriteProperties(Utf8JsonWriter writer, HelloWorldPostRequest helloWorldPostRequest, JsonSerializerOptions jsonSerializerOptions)
160157
{
161-
if (helloWorldPostRequest.MessageOption.IsSet && helloWorldPostRequest.Message == null)
162-
throw new ArgumentNullException(nameof(helloWorldPostRequest.Message), "Property is required for class HelloWorldPostRequest.");
163-
164158
if (helloWorldPostRequest.MessageOption.IsSet)
165159
writer.WriteString("message", helloWorldPostRequest.Message);
166160
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert,
128128
}
129129
}
130130

131-
if (bar.IsSet && bar.Value == null)
132-
throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo.");
133-
134131
return new Foo(bar);
135132
}
136133

@@ -158,9 +155,6 @@ public override void Write(Utf8JsonWriter writer, Foo foo, JsonSerializerOptions
158155
/// <exception cref="NotImplementedException"></exception>
159156
public void WriteProperties(Utf8JsonWriter writer, Foo foo, JsonSerializerOptions jsonSerializerOptions)
160157
{
161-
if (foo.BarOption.IsSet && foo.Bar == null)
162-
throw new ArgumentNullException(nameof(foo.Bar), "Property is required for class Foo.");
163-
164158
if (foo.BarOption.IsSet)
165159
writer.WriteString("bar", foo.Bar);
166160
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ public override IconsDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Typ
128128
}
129129
}
130130

131-
if (varString.IsSet && varString.Value == null)
132-
throw new ArgumentNullException(nameof(varString), "Property is not nullable for class IconsDefaultResponse.");
133-
134131
return new IconsDefaultResponse(varString);
135132
}
136133

@@ -158,9 +155,6 @@ public override void Write(Utf8JsonWriter writer, IconsDefaultResponse iconsDefa
158155
/// <exception cref="NotImplementedException"></exception>
159156
public void WriteProperties(Utf8JsonWriter writer, IconsDefaultResponse iconsDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
160157
{
161-
if (iconsDefaultResponse.StringOption.IsSet && iconsDefaultResponse.String == null)
162-
throw new ArgumentNullException(nameof(iconsDefaultResponse.String), "Property is required for class IconsDefaultResponse.");
163-
164158
if (iconsDefaultResponse.StringOption.IsSet)
165159
{
166160
writer.WritePropertyName("string");

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ public override TestObject Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
128128
}
129129
}
130130

131-
if (name.IsSet && name.Value == null)
132-
throw new ArgumentNullException(nameof(name), "Property is not nullable for class TestObject.");
133-
134131
return new TestObject(name);
135132
}
136133

@@ -158,9 +155,6 @@ public override void Write(Utf8JsonWriter writer, TestObject testObject, JsonSer
158155
/// <exception cref="NotImplementedException"></exception>
159156
public void WriteProperties(Utf8JsonWriter writer, TestObject testObject, JsonSerializerOptions jsonSerializerOptions)
160157
{
161-
if (testObject.NameOption.IsSet && testObject.Name == null)
162-
throw new ArgumentNullException(nameof(testObject.Name), "Property is required for class TestObject.");
163-
164158
if (testObject.NameOption.IsSet)
165159
writer.WriteString("name", testObject.Name);
166160
}

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,6 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert
134134
}
135135
}
136136

137-
if (children.IsSet && children.Value == null)
138-
throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult.");
139-
140-
if (firstName.IsSet && firstName.Value == null)
141-
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult.");
142-
143-
if (lastName.IsSet && lastName.Value == null)
144-
throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult.");
145-
146-
if (type.IsSet && type.Value == null)
147-
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult.");
148-
149137
return new Adult(children, firstName, lastName);
150138
}
151139

@@ -173,15 +161,6 @@ public override void Write(Utf8JsonWriter writer, Adult adult, JsonSerializerOpt
173161
/// <exception cref="NotImplementedException"></exception>
174162
public void WriteProperties(Utf8JsonWriter writer, Adult adult, JsonSerializerOptions jsonSerializerOptions)
175163
{
176-
if (adult.ChildrenOption.IsSet && adult.Children == null)
177-
throw new ArgumentNullException(nameof(adult.Children), "Property is required for class Adult.");
178-
179-
if (adult.FirstNameOption.IsSet && adult.FirstName == null)
180-
throw new ArgumentNullException(nameof(adult.FirstName), "Property is required for class Adult.");
181-
182-
if (adult.LastNameOption.IsSet && adult.LastName == null)
183-
throw new ArgumentNullException(nameof(adult.LastName), "Property is required for class Adult.");
184-
185164
if (adult.ChildrenOption.IsSet)
186165
{
187166
writer.WritePropertyName("children");

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,6 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert
154154
}
155155
}
156156

157-
if (age.IsSet && age.Value == null)
158-
throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child.");
159-
160-
if (boosterSeat.IsSet && boosterSeat.Value == null)
161-
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
162-
163-
if (firstName.IsSet && firstName.Value == null)
164-
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child.");
165-
166-
if (lastName.IsSet && lastName.Value == null)
167-
throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child.");
168-
169-
if (type.IsSet && type.Value == null)
170-
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child.");
171-
172157
return new Child(age, boosterSeat, firstName, lastName);
173158
}
174159

@@ -196,12 +181,6 @@ public override void Write(Utf8JsonWriter writer, Child child, JsonSerializerOpt
196181
/// <exception cref="NotImplementedException"></exception>
197182
public void WriteProperties(Utf8JsonWriter writer, Child child, JsonSerializerOptions jsonSerializerOptions)
198183
{
199-
if (child.FirstNameOption.IsSet && child.FirstName == null)
200-
throw new ArgumentNullException(nameof(child.FirstName), "Property is required for class Child.");
201-
202-
if (child.LastNameOption.IsSet && child.LastName == null)
203-
throw new ArgumentNullException(nameof(child.LastName), "Property is required for class Child.");
204-
205184
if (child.AgeOption.IsSet)
206185
writer.WriteNumber("age", child.AgeOption.Value!.Value);
207186

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,6 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver
186186
}
187187
}
188188

189-
if (firstName.IsSet && firstName.Value == null)
190-
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person.");
191-
192-
if (lastName.IsSet && lastName.Value == null)
193-
throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person.");
194-
195-
if (type.IsSet && type.Value == null)
196-
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person.");
197-
198189
return new Person(firstName, lastName);
199190
}
200191

@@ -232,12 +223,6 @@ public override void Write(Utf8JsonWriter writer, Person person, JsonSerializerO
232223
/// <exception cref="NotImplementedException"></exception>
233224
public void WriteProperties(Utf8JsonWriter writer, Person person, JsonSerializerOptions jsonSerializerOptions)
234225
{
235-
if (person.FirstNameOption.IsSet && person.FirstName == null)
236-
throw new ArgumentNullException(nameof(person.FirstName), "Property is required for class Person.");
237-
238-
if (person.LastNameOption.IsSet && person.LastName == null)
239-
throw new ArgumentNullException(nameof(person.LastName), "Property is required for class Person.");
240-
241226
if (person.FirstNameOption.IsSet)
242227
writer.WriteString("firstName", person.FirstName);
243228

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert
136136
}
137137
}
138138

139-
if (kind.IsSet && kind.Value == null)
140-
throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple.");
141-
142139
return new Apple(kind);
143140
}
144141

@@ -166,9 +163,6 @@ public override void Write(Utf8JsonWriter writer, Apple apple, JsonSerializerOpt
166163
/// <exception cref="NotImplementedException"></exception>
167164
public void WriteProperties(Utf8JsonWriter writer, Apple apple, JsonSerializerOptions jsonSerializerOptions)
168165
{
169-
if (apple.KindOption.IsSet && apple.Kind == null)
170-
throw new ArgumentNullException(nameof(apple.Kind), "Property is required for class Apple.");
171-
172166
if (apple.KindOption.IsSet)
173167
writer.WriteString("kind", apple.Kind);
174168
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver
136136
}
137137
}
138138

139-
if (count.IsSet && count.Value == null)
140-
throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana.");
141-
142139
return new Banana(count);
143140
}
144141

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,6 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert
185185
}
186186
}
187187

188-
if (color.IsSet && color.Value == null)
189-
throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit.");
190-
191188
Option<Apple?> appleParsedValue = apple == null
192189
? default
193190
: new Option<Apple?>(apple);
@@ -234,9 +231,6 @@ public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOpt
234231
/// <exception cref="NotImplementedException"></exception>
235232
public void WriteProperties(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions jsonSerializerOptions)
236233
{
237-
if (fruit.ColorOption.IsSet && fruit.Color == null)
238-
throw new ArgumentNullException(nameof(fruit.Color), "Property is required for class Fruit.");
239-
240234
if (fruit.ColorOption.IsSet)
241235
writer.WriteString("color", fruit.Color);
242236
}

0 commit comments

Comments
 (0)