Skip to content

Commit c1f5705

Browse files
committed
Update samples
1 parent ea22579 commit c1f5705

350 files changed

Lines changed: 912 additions & 912 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/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert
139139
switch (localVarJsonPropertyName)
140140
{
141141
case "age":
142-
age = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
142+
age = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
143143
break;
144144
case "firstName":
145145
firstName = new Option<string>(utf8JsonReader.GetString());
@@ -151,7 +151,7 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert
151151
type = new Option<string>(utf8JsonReader.GetString());
152152
break;
153153
case "boosterSeat":
154-
boosterSeat = new Option<bool?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetBoolean());
154+
boosterSeat = new Option<bool?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (bool?)null : utf8JsonReader.GetBoolean());
155155
break;
156156
default:
157157
break;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver
126126
switch (localVarJsonPropertyName)
127127
{
128128
case "count":
129-
count = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetDecimal());
129+
count = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (decimal?)null : utf8JsonReader.GetDecimal());
130130
break;
131131
default:
132132
break;

samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver
125125
switch (localVarJsonPropertyName)
126126
{
127127
case "count":
128-
count = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetDecimal());
128+
count = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (decimal?)null : utf8JsonReader.GetDecimal());
129129
break;
130130
default:
131131
break;

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC
160160
switch (localVarJsonPropertyName)
161161
{
162162
case "code":
163-
code = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
163+
code = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
164164
break;
165165
case "message":
166166
message = new Option<string>(utf8JsonReader.GetString());

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv
132132
cultivar = new Option<string>(utf8JsonReader.GetString());
133133
break;
134134
case "mealy":
135-
mealy = new Option<bool?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetBoolean());
135+
mealy = new Option<bool?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (bool?)null : utf8JsonReader.GetBoolean());
136136
break;
137137
default:
138138
break;

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Banana.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver
126126
switch (localVarJsonPropertyName)
127127
{
128128
case "lengthCm":
129-
lengthCm = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetDecimal());
129+
lengthCm = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (decimal?)null : utf8JsonReader.GetDecimal());
130130
break;
131131
default:
132132
break;

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon
129129
switch (localVarJsonPropertyName)
130130
{
131131
case "lengthCm":
132-
lengthCm = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetDecimal());
132+
lengthCm = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (decimal?)null : utf8JsonReader.GetDecimal());
133133
break;
134134
case "sweet":
135-
sweet = new Option<bool?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetBoolean());
135+
sweet = new Option<bool?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (bool?)null : utf8JsonReader.GetBoolean());
136136
break;
137137
default:
138138
break;

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Cat.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert,
126126
color = new Option<string>(utf8JsonReader.GetString());
127127
break;
128128
case "declawed":
129-
declawed = new Option<bool?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetBoolean());
129+
declawed = new Option<bool?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (bool?)null : utf8JsonReader.GetBoolean());
130130
break;
131131
default:
132132
break;

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Category.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv
136136
switch (localVarJsonPropertyName)
137137
{
138138
case "id":
139-
id = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt64());
139+
id = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int64?)null : utf8JsonReader.GetInt64());
140140
break;
141141
case "name":
142142
name = new Option<string>(utf8JsonReader.GetString());

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
671671
date = new Option<DateTime?>(JsonSerializer.Deserialize<DateTime>(ref utf8JsonReader, jsonSerializerOptions));
672672
break;
673673
case "number":
674-
number = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetDecimal());
674+
number = new Option<decimal?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (decimal?)null : utf8JsonReader.GetDecimal());
675675
break;
676676
case "password":
677677
password = new Option<string>(utf8JsonReader.GetString());
@@ -686,34 +686,34 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
686686
varDecimal = new Option<decimal?>(JsonSerializer.Deserialize<decimal>(ref utf8JsonReader, jsonSerializerOptions));
687687
break;
688688
case "double":
689-
varDouble = new Option<double?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetDouble());
689+
varDouble = new Option<double?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (double?)null : utf8JsonReader.GetDouble());
690690
break;
691691
case "float":
692-
varFloat = new Option<float?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : (float)utf8JsonReader.GetDouble());
692+
varFloat = new Option<float?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (float?)null : (float)utf8JsonReader.GetDouble());
693693
break;
694694
case "int32":
695-
int32 = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
695+
int32 = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
696696
break;
697697
case "int32Range":
698-
int32Range = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
698+
int32Range = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
699699
break;
700700
case "int64":
701-
int64 = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt64());
701+
int64 = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int64?)null : utf8JsonReader.GetInt64());
702702
break;
703703
case "int64Negative":
704-
int64Negative = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
704+
int64Negative = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
705705
break;
706706
case "int64NegativeExclusive":
707-
int64NegativeExclusive = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
707+
int64NegativeExclusive = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
708708
break;
709709
case "int64Positive":
710-
int64Positive = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
710+
int64Positive = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
711711
break;
712712
case "int64PositiveExclusive":
713-
int64PositiveExclusive = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
713+
int64PositiveExclusive = new Option<long?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
714714
break;
715715
case "integer":
716-
integer = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetInt32());
716+
integer = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetInt32());
717717
break;
718718
case "pattern_with_backslash":
719719
patternWithBackslash = new Option<string>(utf8JsonReader.GetString());
@@ -728,13 +728,13 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
728728
varString = new Option<string>(utf8JsonReader.GetString());
729729
break;
730730
case "unsigned_integer":
731-
unsignedInteger = new Option<uint?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetUInt32());
731+
unsignedInteger = new Option<uint?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int32?)null : utf8JsonReader.GetUInt32());
732732
break;
733733
case "unsigned_long":
734-
unsignedLong = new Option<ulong?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetUInt64());
734+
unsignedLong = new Option<ulong?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Int64?)null : utf8JsonReader.GetUInt64());
735735
break;
736736
case "uuid":
737-
uuid = new Option<Guid?>(utf8JsonReader.TokenType == JsonTokenType.Null ? null : utf8JsonReader.GetGuid());
737+
uuid = new Option<Guid?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (Guid?)null : utf8JsonReader.GetGuid());
738738
break;
739739
default:
740740
break;

0 commit comments

Comments
 (0)