Compare commits

...

1 Commits

Author SHA1 Message Date
devhl
564a527f0d renamed json converter variables 2023-01-28 15:30:38 -05:00
234 changed files with 4243 additions and 4243 deletions

View File

@ -6,34 +6,34 @@
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override {{classname}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override {{classname}} Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
{{#composedSchemas.anyOf}}
Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader;
bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}});
Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = utf8JsonReader;
bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, jsonSerializerOptions, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}});
{{/composedSchemas.anyOf}}
{{#composedSchemas.oneOf}}
Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader;
bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}});
Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = utf8JsonReader;
bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, jsonSerializerOptions, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}});
{{/composedSchemas.oneOf}}
{{#composedSchemas.allOf}}
{{^isInherited}}
Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader;
bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}});
Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = utf8JsonReader;
bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref utf8JsonReader, jsonSerializerOptions, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}});
{{/isInherited}}
{{/composedSchemas.allOf}}
@ -41,18 +41,18 @@
{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{#isEnum}}{{#isNullable}}?{{/isNullable}}{{/isEnum}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = default;
{{/allVars}}
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string{{nrt?}} propertyName = reader.GetString();
reader.Read();
string{{nrt?}} propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -62,38 +62,38 @@
{{^isMap}}
{{^isEnum}}
{{^isUuid}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetString();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = utf8JsonReader.GetString();
{{/isUuid}}
{{/isEnum}}
{{/isMap}}
{{/isString}}
{{#isBoolean}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetBoolean();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = utf8JsonReader.GetBoolean();
{{/isBoolean}}
{{#isNumeric}}
{{^isEnum}}
{{#isDouble}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDouble();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = utf8JsonReader.GetDouble();
{{/isDouble}}
{{#isDecimal}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDecimal();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = utf8JsonReader.GetDecimal();
{{/isDecimal}}
{{#isFloat}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = (float)reader.GetDouble();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = (float)utf8JsonReader.GetDouble();
{{/isFloat}}
{{#isLong}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt64();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = utf8JsonReader.GetInt64();
{{/isLong}}
{{^isLong}}
{{^isFloat}}
{{^isDecimal}}
{{^isDouble}}
{{#isNullable}}
if (reader.TokenType != JsonTokenType.Null)
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt32();
if (utf8JsonReader.TokenType != JsonTokenType.Null)
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = utf8JsonReader.GetInt32();
{{/isNullable}}
{{^isNullable}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt32();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = utf8JsonReader.GetInt32();
{{/isNullable}}
{{/isDouble}}
{{/isDecimal}}
@ -102,18 +102,18 @@
{{/isEnum}}
{{/isNumeric}}
{{#isDate}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<DateTime{{#isNullable}}?{{/isNullable}}>(ref reader, options);
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<DateTime{{#isNullable}}?{{/isNullable}}>(ref utf8JsonReader, jsonSerializerOptions);
{{/isDate}}
{{#isDateTime}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<DateTime{{#isNullable}}?{{/isNullable}}>(ref reader, options);
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<DateTime{{#isNullable}}?{{/isNullable}}>(ref utf8JsonReader, jsonSerializerOptions);
{{/isDateTime}}
{{#isEnum}}
{{^isMap}}
{{#isNumeric}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = ({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}) reader.GetInt32();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = ({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}) utf8JsonReader.GetInt32();
{{/isNumeric}}
{{^isNumeric}}
string {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue = reader.GetString();
string {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue = utf8JsonReader.GetString();
{{^isInnerEnum}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{{datatypeWithEnum}}}Converter.FromString{{#isNullable}}OrDefault{{/isNullable}}({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue);
{{/isInnerEnum}}
@ -124,7 +124,7 @@
{{/isMap}}
{{/isEnum}}
{{#isUuid}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetGuid();
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = utf8JsonReader.GetGuid();
{{/isUuid}}
{{^isUuid}}
{{^isEnum}}
@ -133,7 +133,7 @@
{{^isNumeric}}
{{^isDate}}
{{^isDateTime}}
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref reader, options);
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref utf8JsonReader, jsonSerializerOptions);
{{/isDateTime}}
{{/isDate}}
{{/isNumeric}}
@ -167,9 +167,9 @@
/// </summary>
/// <param name="writer"></param>
/// <param name="{{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
@ -209,11 +209,11 @@
{{/isEnum}}
{{#isDate}}
writer.WritePropertyName("{{baseName}}");
JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, options);
JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, jsonSerializerOptions);
{{/isDate}}
{{#isDateTime}}
writer.WritePropertyName("{{baseName}}");
JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, options);
JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, jsonSerializerOptions);
{{/isDateTime}}
{{#isEnum}}
{{#isNumeric}}
@ -253,7 +253,7 @@
{{^isDate}}
{{^isDateTime}}
writer.WritePropertyName("{{baseName}}");
JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, options);
JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, jsonSerializerOptions);
{{/isDateTime}}
{{/isDate}}
{{/isNumeric}}

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Activity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Dictionary<string, List<ActivityOutputElementRepresentation>> activityOutputs = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "activity_outputs":
activityOutputs = JsonSerializer.Deserialize<Dictionary<string, List<ActivityOutputElementRepresentation>>>(ref reader, options);
activityOutputs = JsonSerializer.Deserialize<Dictionary<string, List<ActivityOutputElementRepresentation>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -141,14 +141,14 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="activity"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Activity activity, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Activity activity, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("activity_outputs");
JsonSerializer.Serialize(writer, activity.ActivityOutputs, options);
JsonSerializer.Serialize(writer, activity.ActivityOutputs, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -105,43 +105,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string prop1 = default;
Object prop2 = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "prop1":
prop1 = reader.GetString();
prop1 = utf8JsonReader.GetString();
break;
case "prop2":
prop2 = JsonSerializer.Deserialize<Object>(ref reader, options);
prop2 = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -157,15 +157,15 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="activityOutputElementRepresentation"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ActivityOutputElementRepresentation activityOutputElementRepresentation, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ActivityOutputElementRepresentation activityOutputElementRepresentation, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WriteString("prop1", activityOutputElementRepresentation.Prop1);
writer.WritePropertyName("prop2");
JsonSerializer.Serialize(writer, activityOutputElementRepresentation.Prop2, options);
JsonSerializer.Serialize(writer, activityOutputElementRepresentation.Prop2, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -175,19 +175,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override AdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Object emptyMap = default;
Dictionary<string, Dictionary<string, string>> mapOfMapProperty = default;
@ -198,44 +198,44 @@ namespace Org.OpenAPITools.Model
Dictionary<string, string> mapWithUndeclaredPropertiesString = default;
Object anytype1 = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "empty_map":
emptyMap = JsonSerializer.Deserialize<Object>(ref reader, options);
emptyMap = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_of_map_property":
mapOfMapProperty = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(ref reader, options);
mapOfMapProperty = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_property":
mapProperty = JsonSerializer.Deserialize<Dictionary<string, string>>(ref reader, options);
mapProperty = JsonSerializer.Deserialize<Dictionary<string, string>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_with_undeclared_properties_anytype_1":
mapWithUndeclaredPropertiesAnytype1 = JsonSerializer.Deserialize<Object>(ref reader, options);
mapWithUndeclaredPropertiesAnytype1 = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_with_undeclared_properties_anytype_2":
mapWithUndeclaredPropertiesAnytype2 = JsonSerializer.Deserialize<Object>(ref reader, options);
mapWithUndeclaredPropertiesAnytype2 = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_with_undeclared_properties_anytype_3":
mapWithUndeclaredPropertiesAnytype3 = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref reader, options);
mapWithUndeclaredPropertiesAnytype3 = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_with_undeclared_properties_string":
mapWithUndeclaredPropertiesString = JsonSerializer.Deserialize<Dictionary<string, string>>(ref reader, options);
mapWithUndeclaredPropertiesString = JsonSerializer.Deserialize<Dictionary<string, string>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "anytype_1":
anytype1 = JsonSerializer.Deserialize<Object>(ref reader, options);
anytype1 = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -251,28 +251,28 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="additionalPropertiesClass"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, AdditionalPropertiesClass additionalPropertiesClass, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, AdditionalPropertiesClass additionalPropertiesClass, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("empty_map");
JsonSerializer.Serialize(writer, additionalPropertiesClass.EmptyMap, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.EmptyMap, jsonSerializerOptions);
writer.WritePropertyName("map_of_map_property");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapOfMapProperty, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapOfMapProperty, jsonSerializerOptions);
writer.WritePropertyName("map_property");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapProperty, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapProperty, jsonSerializerOptions);
writer.WritePropertyName("map_with_undeclared_properties_anytype_1");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype1, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype1, jsonSerializerOptions);
writer.WritePropertyName("map_with_undeclared_properties_anytype_2");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype2, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype2, jsonSerializerOptions);
writer.WritePropertyName("map_with_undeclared_properties_anytype_3");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype3, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype3, jsonSerializerOptions);
writer.WritePropertyName("map_with_undeclared_properties_string");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesString, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesString, jsonSerializerOptions);
writer.WritePropertyName("anytype_1");
JsonSerializer.Serialize(writer, additionalPropertiesClass.Anytype1, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.Anytype1, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -115,43 +115,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Animal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string className = default;
string color = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
case "color":
color = reader.GetString();
color = utf8JsonReader.GetString();
break;
default:
break;
@ -167,9 +167,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="animal"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Animal animal, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Animal animal, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -117,47 +117,47 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ApiResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
int code = default;
string message = default;
string type = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "code":
code = reader.GetInt32();
code = utf8JsonReader.GetInt32();
break;
case "message":
message = reader.GetString();
message = utf8JsonReader.GetString();
break;
case "type":
type = reader.GetString();
type = utf8JsonReader.GetString();
break;
default:
break;
@ -173,9 +173,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="apiResponse"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ApiResponse apiResponse, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ApiResponse apiResponse, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -119,43 +119,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Apple Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string cultivar = default;
string origin = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "cultivar":
cultivar = reader.GetString();
cultivar = utf8JsonReader.GetString();
break;
case "origin":
origin = reader.GetString();
origin = utf8JsonReader.GetString();
break;
default:
break;
@ -171,9 +171,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="apple"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Apple apple, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Apple apple, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -98,43 +98,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override AppleReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string cultivar = default;
bool mealy = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "cultivar":
cultivar = reader.GetString();
cultivar = utf8JsonReader.GetString();
break;
case "mealy":
mealy = reader.GetBoolean();
mealy = utf8JsonReader.GetBoolean();
break;
default:
break;
@ -150,9 +150,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="appleReq"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, AppleReq appleReq, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, AppleReq appleReq, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<List<decimal>> arrayArrayNumber = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "ArrayArrayNumber":
arrayArrayNumber = JsonSerializer.Deserialize<List<List<decimal>>>(ref reader, options);
arrayArrayNumber = JsonSerializer.Deserialize<List<List<decimal>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -141,14 +141,14 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="arrayOfArrayOfNumberOnly"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("ArrayArrayNumber");
JsonSerializer.Serialize(writer, arrayOfArrayOfNumberOnly.ArrayArrayNumber, options);
JsonSerializer.Serialize(writer, arrayOfArrayOfNumberOnly.ArrayArrayNumber, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<decimal> arrayNumber = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "ArrayNumber":
arrayNumber = JsonSerializer.Deserialize<List<decimal>>(ref reader, options);
arrayNumber = JsonSerializer.Deserialize<List<decimal>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -141,14 +141,14 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="arrayOfNumberOnly"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ArrayOfNumberOnly arrayOfNumberOnly, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ArrayOfNumberOnly arrayOfNumberOnly, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("ArrayNumber");
JsonSerializer.Serialize(writer, arrayOfNumberOnly.ArrayNumber, options);
JsonSerializer.Serialize(writer, arrayOfNumberOnly.ArrayNumber, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -117,47 +117,47 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ArrayTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<List<long>> arrayArrayOfInteger = default;
List<List<ReadOnlyFirst>> arrayArrayOfModel = default;
List<string> arrayOfString = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "array_array_of_integer":
arrayArrayOfInteger = JsonSerializer.Deserialize<List<List<long>>>(ref reader, options);
arrayArrayOfInteger = JsonSerializer.Deserialize<List<List<long>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "array_array_of_model":
arrayArrayOfModel = JsonSerializer.Deserialize<List<List<ReadOnlyFirst>>>(ref reader, options);
arrayArrayOfModel = JsonSerializer.Deserialize<List<List<ReadOnlyFirst>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "array_of_string":
arrayOfString = JsonSerializer.Deserialize<List<string>>(ref reader, options);
arrayOfString = JsonSerializer.Deserialize<List<string>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -173,18 +173,18 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="arrayTest"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ArrayTest arrayTest, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ArrayTest arrayTest, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("array_array_of_integer");
JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfInteger, options);
JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfInteger, jsonSerializerOptions);
writer.WritePropertyName("array_array_of_model");
JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfModel, options);
JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfModel, jsonSerializerOptions);
writer.WritePropertyName("array_of_string");
JsonSerializer.Serialize(writer, arrayTest.ArrayOfString, options);
JsonSerializer.Serialize(writer, arrayTest.ArrayOfString, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Banana Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
decimal lengthCm = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "lengthCm":
lengthCm = reader.GetInt32();
lengthCm = utf8JsonReader.GetInt32();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="banana"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Banana banana, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Banana banana, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -98,43 +98,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override BananaReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
decimal lengthCm = default;
bool sweet = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "lengthCm":
lengthCm = reader.GetInt32();
lengthCm = utf8JsonReader.GetInt32();
break;
case "sweet":
sweet = reader.GetBoolean();
sweet = utf8JsonReader.GetBoolean();
break;
default:
break;
@ -150,9 +150,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="bananaReq"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, BananaReq bananaReq, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, BananaReq bananaReq, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override BasquePig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string className = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="basquePig"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, BasquePig basquePig, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, BasquePig basquePig, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -154,19 +154,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Capitalization Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string aTTNAME = default;
string capitalCamel = default;
@ -175,38 +175,38 @@ namespace Org.OpenAPITools.Model
string smallCamel = default;
string smallSnake = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "ATT_NAME":
aTTNAME = reader.GetString();
aTTNAME = utf8JsonReader.GetString();
break;
case "CapitalCamel":
capitalCamel = reader.GetString();
capitalCamel = utf8JsonReader.GetString();
break;
case "Capital_Snake":
capitalSnake = reader.GetString();
capitalSnake = utf8JsonReader.GetString();
break;
case "SCA_ETH_Flow_Points":
sCAETHFlowPoints = reader.GetString();
sCAETHFlowPoints = utf8JsonReader.GetString();
break;
case "smallCamel":
smallCamel = reader.GetString();
smallCamel = utf8JsonReader.GetString();
break;
case "small_Snake":
smallSnake = reader.GetString();
smallSnake = utf8JsonReader.GetString();
break;
default:
break;
@ -222,9 +222,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="capitalization"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Capitalization capitalization, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Capitalization capitalization, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -76,49 +76,49 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Cat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader dictionaryReader = reader;
bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize<Dictionary<string, int>>(ref reader, options, out Dictionary<string, int>? dictionary);
Utf8JsonReader dictionaryReader = utf8JsonReader;
bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize<Dictionary<string, int>>(ref utf8JsonReader, jsonSerializerOptions, out Dictionary<string, int>? dictionary);
Utf8JsonReader catAllOfReader = reader;
bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize<CatAllOf>(ref reader, options, out CatAllOf? catAllOf);
Utf8JsonReader catAllOfReader = utf8JsonReader;
bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize<CatAllOf>(ref utf8JsonReader, jsonSerializerOptions, out CatAllOf? catAllOf);
string className = default;
string color = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
case "color":
color = reader.GetString();
color = utf8JsonReader.GetString();
break;
default:
break;
@ -134,9 +134,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="cat"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override CatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override CatAllOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
bool declawed = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "declawed":
declawed = reader.GetBoolean();
declawed = utf8JsonReader.GetBoolean();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="catAllOf"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, CatAllOf catAllOf, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, CatAllOf catAllOf, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -105,43 +105,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Category Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
long id = default;
string name = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "id":
id = reader.GetInt64();
id = utf8JsonReader.GetInt64();
break;
case "name":
name = reader.GetString();
name = utf8JsonReader.GetString();
break;
default:
break;
@ -157,9 +157,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="category"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Category category, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Category category, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -68,42 +68,42 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ChildCat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader childCatAllOfReader = reader;
bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize<ChildCatAllOf>(ref reader, options, out ChildCatAllOf? childCatAllOf);
Utf8JsonReader childCatAllOfReader = utf8JsonReader;
bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize<ChildCatAllOf>(ref utf8JsonReader, jsonSerializerOptions, out ChildCatAllOf? childCatAllOf);
string petType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "pet_type":
petType = reader.GetString();
petType = utf8JsonReader.GetString();
break;
default:
break;
@ -119,9 +119,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="childCat"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -144,43 +144,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ChildCatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ChildCatAllOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string name = default;
ChildCatAllOf.PetTypeEnum petType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "name":
name = reader.GetString();
name = utf8JsonReader.GetString();
break;
case "pet_type":
string petTypeRawValue = reader.GetString();
string petTypeRawValue = utf8JsonReader.GetString();
petType = ChildCatAllOf.PetTypeEnumFromString(petTypeRawValue);
break;
default:
@ -197,9 +197,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="childCatAllOf"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ChildCatAllOf childCatAllOf, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ChildCatAllOf childCatAllOf, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ClassModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string classProperty = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "_class":
classProperty = reader.GetString();
classProperty = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="classModel"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -89,39 +89,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ComplexQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader shapeInterfaceReader = reader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref reader, options, out ShapeInterface? shapeInterface);
Utf8JsonReader shapeInterfaceReader = utf8JsonReader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref utf8JsonReader, jsonSerializerOptions, out ShapeInterface? shapeInterface);
Utf8JsonReader quadrilateralInterfaceReader = reader;
bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize<QuadrilateralInterface>(ref reader, options, out QuadrilateralInterface? quadrilateralInterface);
Utf8JsonReader quadrilateralInterfaceReader = utf8JsonReader;
bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize<QuadrilateralInterface>(ref utf8JsonReader, jsonSerializerOptions, out QuadrilateralInterface? quadrilateralInterface);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="complexQuadrilateral"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override DanishPig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string className = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="danishPig"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, DanishPig danishPig, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, DanishPig danishPig, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override DeprecatedObject Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string name = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "name":
name = reader.GetString();
name = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="deprecatedObject"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, DeprecatedObject deprecatedObject, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, DeprecatedObject deprecatedObject, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -69,46 +69,46 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Dog Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader dogAllOfReader = reader;
bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize<DogAllOf>(ref reader, options, out DogAllOf? dogAllOf);
Utf8JsonReader dogAllOfReader = utf8JsonReader;
bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize<DogAllOf>(ref utf8JsonReader, jsonSerializerOptions, out DogAllOf? dogAllOf);
string className = default;
string color = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
case "color":
color = reader.GetString();
color = utf8JsonReader.GetString();
break;
default:
break;
@ -124,9 +124,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="dog"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override DogAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override DogAllOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string breed = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "breed":
breed = reader.GetString();
breed = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="dogAllOf"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, DogAllOf dogAllOf, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, DogAllOf dogAllOf, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -120,51 +120,51 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Drawing Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Shape mainShape = default;
ShapeOrNull shapeOrNull = default;
List<Shape> shapes = default;
NullableShape nullableShape = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "mainShape":
mainShape = JsonSerializer.Deserialize<Shape>(ref reader, options);
mainShape = JsonSerializer.Deserialize<Shape>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "shapeOrNull":
shapeOrNull = JsonSerializer.Deserialize<ShapeOrNull>(ref reader, options);
shapeOrNull = JsonSerializer.Deserialize<ShapeOrNull>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "shapes":
shapes = JsonSerializer.Deserialize<List<Shape>>(ref reader, options);
shapes = JsonSerializer.Deserialize<List<Shape>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "nullableShape":
nullableShape = JsonSerializer.Deserialize<NullableShape>(ref reader, options);
nullableShape = JsonSerializer.Deserialize<NullableShape>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -180,20 +180,20 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="drawing"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Drawing drawing, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Drawing drawing, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("mainShape");
JsonSerializer.Serialize(writer, drawing.MainShape, options);
JsonSerializer.Serialize(writer, drawing.MainShape, jsonSerializerOptions);
writer.WritePropertyName("shapeOrNull");
JsonSerializer.Serialize(writer, drawing.ShapeOrNull, options);
JsonSerializer.Serialize(writer, drawing.ShapeOrNull, jsonSerializerOptions);
writer.WritePropertyName("shapes");
JsonSerializer.Serialize(writer, drawing.Shapes, options);
JsonSerializer.Serialize(writer, drawing.Shapes, jsonSerializerOptions);
writer.WritePropertyName("nullableShape");
JsonSerializer.Serialize(writer, drawing.NullableShape, options);
JsonSerializer.Serialize(writer, drawing.NullableShape, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -205,43 +205,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override EnumArrays Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<EnumArrays.ArrayEnumEnum> arrayEnum = default;
EnumArrays.JustSymbolEnum justSymbol = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "array_enum":
arrayEnum = JsonSerializer.Deserialize<List<EnumArrays.ArrayEnumEnum>>(ref reader, options);
arrayEnum = JsonSerializer.Deserialize<List<EnumArrays.ArrayEnumEnum>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "just_symbol":
string justSymbolRawValue = reader.GetString();
string justSymbolRawValue = utf8JsonReader.GetString();
justSymbol = EnumArrays.JustSymbolEnumFromString(justSymbolRawValue);
break;
default:
@ -258,14 +258,14 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="enumArrays"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, EnumArrays enumArrays, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, EnumArrays enumArrays, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("array_enum");
JsonSerializer.Serialize(writer, enumArrays.ArrayEnum, options);
JsonSerializer.Serialize(writer, enumArrays.ArrayEnum, jsonSerializerOptions);
var justSymbolRawValue = EnumArrays.JustSymbolEnumToJsonValue(enumArrays.JustSymbol);
if (justSymbolRawValue != null)
writer.WriteString("just_symbol", justSymbolRawValue);

View File

@ -446,19 +446,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override EnumTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
EnumTest.EnumIntegerEnum enumInteger = default;
EnumTest.EnumIntegerOnlyEnum enumIntegerOnly = default;
@ -470,52 +470,52 @@ namespace Org.OpenAPITools.Model
OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default;
OuterEnum? outerEnum = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "enum_integer":
enumInteger = (EnumTest.EnumIntegerEnum) reader.GetInt32();
enumInteger = (EnumTest.EnumIntegerEnum) utf8JsonReader.GetInt32();
break;
case "enum_integer_only":
enumIntegerOnly = (EnumTest.EnumIntegerOnlyEnum) reader.GetInt32();
enumIntegerOnly = (EnumTest.EnumIntegerOnlyEnum) utf8JsonReader.GetInt32();
break;
case "enum_number":
enumNumber = (EnumTest.EnumNumberEnum) reader.GetInt32();
enumNumber = (EnumTest.EnumNumberEnum) utf8JsonReader.GetInt32();
break;
case "enum_string":
string enumStringRawValue = reader.GetString();
string enumStringRawValue = utf8JsonReader.GetString();
enumString = EnumTest.EnumStringEnumFromString(enumStringRawValue);
break;
case "enum_string_required":
string enumStringRequiredRawValue = reader.GetString();
string enumStringRequiredRawValue = utf8JsonReader.GetString();
enumStringRequired = EnumTest.EnumStringRequiredEnumFromString(enumStringRequiredRawValue);
break;
case "outerEnumDefaultValue":
string outerEnumDefaultValueRawValue = reader.GetString();
string outerEnumDefaultValueRawValue = utf8JsonReader.GetString();
outerEnumDefaultValue = OuterEnumDefaultValueConverter.FromString(outerEnumDefaultValueRawValue);
break;
case "outerEnumInteger":
string outerEnumIntegerRawValue = reader.GetString();
string outerEnumIntegerRawValue = utf8JsonReader.GetString();
outerEnumInteger = OuterEnumIntegerConverter.FromString(outerEnumIntegerRawValue);
break;
case "outerEnumIntegerDefaultValue":
string outerEnumIntegerDefaultValueRawValue = reader.GetString();
string outerEnumIntegerDefaultValueRawValue = utf8JsonReader.GetString();
outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValueConverter.FromString(outerEnumIntegerDefaultValueRawValue);
break;
case "outerEnum":
string outerEnumRawValue = reader.GetString();
string outerEnumRawValue = utf8JsonReader.GetString();
outerEnum = OuterEnumConverter.FromStringOrDefault(outerEnumRawValue);
break;
default:
@ -532,9 +532,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="enumTest"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, EnumTest enumTest, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, EnumTest enumTest, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -89,39 +89,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override EquilateralTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader shapeInterfaceReader = reader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref reader, options, out ShapeInterface? shapeInterface);
Utf8JsonReader shapeInterfaceReader = utf8JsonReader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref utf8JsonReader, jsonSerializerOptions, out ShapeInterface? shapeInterface);
Utf8JsonReader triangleInterfaceReader = reader;
bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize<TriangleInterface>(ref reader, options, out TriangleInterface? triangleInterface);
Utf8JsonReader triangleInterfaceReader = utf8JsonReader;
bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize<TriangleInterface>(ref utf8JsonReader, jsonSerializerOptions, out TriangleInterface? triangleInterface);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="equilateralTriangle"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -94,39 +94,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override File Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string sourceURI = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "sourceURI":
sourceURI = reader.GetString();
sourceURI = utf8JsonReader.GetString();
break;
default:
break;
@ -142,9 +142,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="file"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, File file, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, File file, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -105,43 +105,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override FileSchemaTestClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
File file = default;
List<File> files = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "file":
file = JsonSerializer.Deserialize<File>(ref reader, options);
file = JsonSerializer.Deserialize<File>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "files":
files = JsonSerializer.Deserialize<List<File>>(ref reader, options);
files = JsonSerializer.Deserialize<List<File>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -157,16 +157,16 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="fileSchemaTestClass"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, FileSchemaTestClass fileSchemaTestClass, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, FileSchemaTestClass fileSchemaTestClass, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("file");
JsonSerializer.Serialize(writer, fileSchemaTestClass.File, options);
JsonSerializer.Serialize(writer, fileSchemaTestClass.File, jsonSerializerOptions);
writer.WritePropertyName("files");
JsonSerializer.Serialize(writer, fileSchemaTestClass.Files, options);
JsonSerializer.Serialize(writer, fileSchemaTestClass.Files, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Foo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string bar = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "bar":
bar = reader.GetString();
bar = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="foo"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Foo foo, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Foo foo, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override FooGetDefaultResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Foo stringProperty = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "string":
stringProperty = JsonSerializer.Deserialize<Foo>(ref reader, options);
stringProperty = JsonSerializer.Deserialize<Foo>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -141,14 +141,14 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="fooGetDefaultResponse"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("string");
JsonSerializer.Serialize(writer, fooGetDefaultResponse.StringProperty, options);
JsonSerializer.Serialize(writer, fooGetDefaultResponse.StringProperty, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -368,19 +368,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override FormatTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
System.IO.Stream binary = default;
byte[] byteProperty = default;
@ -399,68 +399,68 @@ namespace Org.OpenAPITools.Model
string stringProperty = default;
Guid uuid = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "binary":
binary = JsonSerializer.Deserialize<System.IO.Stream>(ref reader, options);
binary = JsonSerializer.Deserialize<System.IO.Stream>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "byte":
byteProperty = JsonSerializer.Deserialize<byte[]>(ref reader, options);
byteProperty = JsonSerializer.Deserialize<byte[]>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "date":
date = JsonSerializer.Deserialize<DateTime>(ref reader, options);
date = JsonSerializer.Deserialize<DateTime>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "dateTime":
dateTime = JsonSerializer.Deserialize<DateTime>(ref reader, options);
dateTime = JsonSerializer.Deserialize<DateTime>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "decimal":
decimalProperty = JsonSerializer.Deserialize<decimal>(ref reader, options);
decimalProperty = JsonSerializer.Deserialize<decimal>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "double":
doubleProperty = reader.GetDouble();
doubleProperty = utf8JsonReader.GetDouble();
break;
case "float":
floatProperty = (float)reader.GetDouble();
floatProperty = (float)utf8JsonReader.GetDouble();
break;
case "int32":
int32 = reader.GetInt32();
int32 = utf8JsonReader.GetInt32();
break;
case "int64":
int64 = reader.GetInt64();
int64 = utf8JsonReader.GetInt64();
break;
case "integer":
integer = reader.GetInt32();
integer = utf8JsonReader.GetInt32();
break;
case "number":
number = reader.GetInt32();
number = utf8JsonReader.GetInt32();
break;
case "password":
password = reader.GetString();
password = utf8JsonReader.GetString();
break;
case "pattern_with_digits":
patternWithDigits = reader.GetString();
patternWithDigits = utf8JsonReader.GetString();
break;
case "pattern_with_digits_and_delimiter":
patternWithDigitsAndDelimiter = reader.GetString();
patternWithDigitsAndDelimiter = utf8JsonReader.GetString();
break;
case "string":
stringProperty = reader.GetString();
stringProperty = utf8JsonReader.GetString();
break;
case "uuid":
uuid = reader.GetGuid();
uuid = utf8JsonReader.GetGuid();
break;
default:
break;
@ -476,22 +476,22 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="formatTest"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("binary");
JsonSerializer.Serialize(writer, formatTest.Binary, options);
JsonSerializer.Serialize(writer, formatTest.Binary, jsonSerializerOptions);
writer.WritePropertyName("byte");
JsonSerializer.Serialize(writer, formatTest.ByteProperty, options);
JsonSerializer.Serialize(writer, formatTest.ByteProperty, jsonSerializerOptions);
writer.WritePropertyName("date");
JsonSerializer.Serialize(writer, formatTest.Date, options);
JsonSerializer.Serialize(writer, formatTest.Date, jsonSerializerOptions);
writer.WritePropertyName("dateTime");
JsonSerializer.Serialize(writer, formatTest.DateTime, options);
JsonSerializer.Serialize(writer, formatTest.DateTime, jsonSerializerOptions);
writer.WritePropertyName("decimal");
JsonSerializer.Serialize(writer, formatTest.DecimalProperty, options);
JsonSerializer.Serialize(writer, formatTest.DecimalProperty, jsonSerializerOptions);
writer.WriteNumber("double", formatTest.DoubleProperty);
writer.WriteNumber("float", formatTest.FloatProperty);
writer.WriteNumber("int32", formatTest.Int32);

View File

@ -119,45 +119,45 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Fruit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader appleReader = reader;
bool appleDeserialized = Client.ClientUtils.TryDeserialize<Apple>(ref appleReader, options, out Apple? apple);
Utf8JsonReader appleReader = utf8JsonReader;
bool appleDeserialized = Client.ClientUtils.TryDeserialize<Apple>(ref appleReader, jsonSerializerOptions, out Apple? apple);
Utf8JsonReader bananaReader = reader;
bool bananaDeserialized = Client.ClientUtils.TryDeserialize<Banana>(ref bananaReader, options, out Banana? banana);
Utf8JsonReader bananaReader = utf8JsonReader;
bool bananaDeserialized = Client.ClientUtils.TryDeserialize<Banana>(ref bananaReader, jsonSerializerOptions, out Banana? banana);
string color = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "color":
color = reader.GetString();
color = utf8JsonReader.GetString();
break;
default:
break;
@ -179,9 +179,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="fruit"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -90,39 +90,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override FruitReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override FruitReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader appleReqReader = reader;
bool appleReqDeserialized = Client.ClientUtils.TryDeserialize<AppleReq>(ref appleReqReader, options, out AppleReq? appleReq);
Utf8JsonReader appleReqReader = utf8JsonReader;
bool appleReqDeserialized = Client.ClientUtils.TryDeserialize<AppleReq>(ref appleReqReader, jsonSerializerOptions, out AppleReq? appleReq);
Utf8JsonReader bananaReqReader = reader;
bool bananaReqDeserialized = Client.ClientUtils.TryDeserialize<BananaReq>(ref bananaReqReader, options, out BananaReq? bananaReq);
Utf8JsonReader bananaReqReader = utf8JsonReader;
bool bananaReqDeserialized = Client.ClientUtils.TryDeserialize<BananaReq>(ref bananaReqReader, jsonSerializerOptions, out BananaReq? bananaReq);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -146,9 +146,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="fruitReq"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -100,45 +100,45 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override GmFruit Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader appleReader = reader;
bool appleDeserialized = Client.ClientUtils.TryDeserialize<Apple>(ref appleReader, options, out Apple? apple);
Utf8JsonReader appleReader = utf8JsonReader;
bool appleDeserialized = Client.ClientUtils.TryDeserialize<Apple>(ref appleReader, jsonSerializerOptions, out Apple? apple);
Utf8JsonReader bananaReader = reader;
bool bananaDeserialized = Client.ClientUtils.TryDeserialize<Banana>(ref bananaReader, options, out Banana? banana);
Utf8JsonReader bananaReader = utf8JsonReader;
bool bananaDeserialized = Client.ClientUtils.TryDeserialize<Banana>(ref bananaReader, jsonSerializerOptions, out Banana? banana);
string color = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "color":
color = reader.GetString();
color = utf8JsonReader.GetString();
break;
default:
break;
@ -154,9 +154,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="gmFruit"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -103,39 +103,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override GrandparentAnimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string petType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "pet_type":
petType = reader.GetString();
petType = utf8JsonReader.GetString();
break;
default:
break;
@ -151,9 +151,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="grandparentAnimal"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, GrandparentAnimal grandparentAnimal, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, GrandparentAnimal grandparentAnimal, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -142,43 +142,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override HasOnlyReadOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string bar = default;
string foo = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "bar":
bar = reader.GetString();
bar = utf8JsonReader.GetString();
break;
case "foo":
foo = reader.GetString();
foo = utf8JsonReader.GetString();
break;
default:
break;
@ -194,9 +194,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="hasOnlyReadOnly"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, HasOnlyReadOnly hasOnlyReadOnly, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, HasOnlyReadOnly hasOnlyReadOnly, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -84,39 +84,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override HealthCheckResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override HealthCheckResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string nullableMessage = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "NullableMessage":
nullableMessage = reader.GetString();
nullableMessage = utf8JsonReader.GetString();
break;
default:
break;
@ -132,9 +132,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="healthCheckResult"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, HealthCheckResult healthCheckResult, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, HealthCheckResult healthCheckResult, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -82,39 +82,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override IsoscelesTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader shapeInterfaceReader = reader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref reader, options, out ShapeInterface? shapeInterface);
Utf8JsonReader shapeInterfaceReader = utf8JsonReader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref utf8JsonReader, jsonSerializerOptions, out ShapeInterface? shapeInterface);
Utf8JsonReader triangleInterfaceReader = reader;
bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize<TriangleInterface>(ref reader, options, out TriangleInterface? triangleInterface);
Utf8JsonReader triangleInterfaceReader = utf8JsonReader;
bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize<TriangleInterface>(ref utf8JsonReader, jsonSerializerOptions, out TriangleInterface? triangleInterface);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -132,9 +132,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="isoscelesTriangle"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override List Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string _123list = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "123-list":
_123list = reader.GetString();
_123list = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="list"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, List list, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, List list, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -122,42 +122,42 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Mammal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader whaleReader = reader;
bool whaleDeserialized = Client.ClientUtils.TryDeserialize<Whale>(ref whaleReader, options, out Whale? whale);
Utf8JsonReader whaleReader = utf8JsonReader;
bool whaleDeserialized = Client.ClientUtils.TryDeserialize<Whale>(ref whaleReader, jsonSerializerOptions, out Whale? whale);
Utf8JsonReader zebraReader = reader;
bool zebraDeserialized = Client.ClientUtils.TryDeserialize<Zebra>(ref zebraReader, options, out Zebra? zebra);
Utf8JsonReader zebraReader = utf8JsonReader;
bool zebraDeserialized = Client.ClientUtils.TryDeserialize<Zebra>(ref zebraReader, jsonSerializerOptions, out Zebra? zebra);
Utf8JsonReader pigReader = reader;
bool pigDeserialized = Client.ClientUtils.TryDeserialize<Pig>(ref pigReader, options, out Pig? pig);
Utf8JsonReader pigReader = utf8JsonReader;
bool pigDeserialized = Client.ClientUtils.TryDeserialize<Pig>(ref pigReader, jsonSerializerOptions, out Pig? pig);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -184,9 +184,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="mammal"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -179,51 +179,51 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override MapTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Dictionary<string, bool> directMap = default;
Dictionary<string, bool> indirectMap = default;
Dictionary<string, Dictionary<string, string>> mapMapOfString = default;
Dictionary<string, MapTest.InnerEnum> mapOfEnumString = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "direct_map":
directMap = JsonSerializer.Deserialize<Dictionary<string, bool>>(ref reader, options);
directMap = JsonSerializer.Deserialize<Dictionary<string, bool>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "indirect_map":
indirectMap = JsonSerializer.Deserialize<Dictionary<string, bool>>(ref reader, options);
indirectMap = JsonSerializer.Deserialize<Dictionary<string, bool>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_map_of_string":
mapMapOfString = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(ref reader, options);
mapMapOfString = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_of_enum_string":
mapOfEnumString = JsonSerializer.Deserialize<Dictionary<string, MapTest.InnerEnum>>(ref reader, options);
mapOfEnumString = JsonSerializer.Deserialize<Dictionary<string, MapTest.InnerEnum>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -239,20 +239,20 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="mapTest"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, MapTest mapTest, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, MapTest mapTest, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("direct_map");
JsonSerializer.Serialize(writer, mapTest.DirectMap, options);
JsonSerializer.Serialize(writer, mapTest.DirectMap, jsonSerializerOptions);
writer.WritePropertyName("indirect_map");
JsonSerializer.Serialize(writer, mapTest.IndirectMap, options);
JsonSerializer.Serialize(writer, mapTest.IndirectMap, jsonSerializerOptions);
writer.WritePropertyName("map_map_of_string");
JsonSerializer.Serialize(writer, mapTest.MapMapOfString, options);
JsonSerializer.Serialize(writer, mapTest.MapMapOfString, jsonSerializerOptions);
writer.WritePropertyName("map_of_enum_string");
JsonSerializer.Serialize(writer, mapTest.MapOfEnumString, options);
JsonSerializer.Serialize(writer, mapTest.MapOfEnumString, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -117,47 +117,47 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
DateTime dateTime = default;
Dictionary<string, Animal> map = default;
Guid uuid = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "dateTime":
dateTime = JsonSerializer.Deserialize<DateTime>(ref reader, options);
dateTime = JsonSerializer.Deserialize<DateTime>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map":
map = JsonSerializer.Deserialize<Dictionary<string, Animal>>(ref reader, options);
map = JsonSerializer.Deserialize<Dictionary<string, Animal>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "uuid":
uuid = reader.GetGuid();
uuid = utf8JsonReader.GetGuid();
break;
default:
break;
@ -173,16 +173,16 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="mixedPropertiesAndAdditionalPropertiesClass"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("dateTime");
JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.DateTime, options);
JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.DateTime, jsonSerializerOptions);
writer.WritePropertyName("map");
JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.Map, options);
JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.Map, jsonSerializerOptions);
writer.WriteString("uuid", mixedPropertiesAndAdditionalPropertiesClass.Uuid);
writer.WriteEndObject();

View File

@ -105,43 +105,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Model200Response Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string classProperty = default;
int name = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "class":
classProperty = reader.GetString();
classProperty = utf8JsonReader.GetString();
break;
case "name":
name = reader.GetInt32();
name = utf8JsonReader.GetInt32();
break;
default:
break;
@ -157,9 +157,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="model200Response"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ModelClient Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string clientProperty = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "client":
clientProperty = reader.GetString();
clientProperty = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="modelClient"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ModelClient modelClient, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ModelClient modelClient, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -166,51 +166,51 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Name Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
int nameProperty = default;
string property = default;
int snakeCase = default;
int _123number = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "name":
nameProperty = reader.GetInt32();
nameProperty = utf8JsonReader.GetInt32();
break;
case "property":
property = reader.GetString();
property = utf8JsonReader.GetString();
break;
case "snake_case":
snakeCase = reader.GetInt32();
snakeCase = utf8JsonReader.GetInt32();
break;
case "123Number":
_123number = reader.GetInt32();
_123number = utf8JsonReader.GetInt32();
break;
default:
break;
@ -226,9 +226,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="name"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Name name, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Name name, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -189,19 +189,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override NullableClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<Object> arrayItemsNullable = default;
Dictionary<string, Object> objectItemsNullable = default;
@ -216,58 +216,58 @@ namespace Org.OpenAPITools.Model
Dictionary<string, Object> objectNullableProp = default;
string stringProp = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "array_items_nullable":
arrayItemsNullable = JsonSerializer.Deserialize<List<Object>>(ref reader, options);
arrayItemsNullable = JsonSerializer.Deserialize<List<Object>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "object_items_nullable":
objectItemsNullable = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref reader, options);
objectItemsNullable = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "array_and_items_nullable_prop":
arrayAndItemsNullableProp = JsonSerializer.Deserialize<List<Object>>(ref reader, options);
arrayAndItemsNullableProp = JsonSerializer.Deserialize<List<Object>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "array_nullable_prop":
arrayNullableProp = JsonSerializer.Deserialize<List<Object>>(ref reader, options);
arrayNullableProp = JsonSerializer.Deserialize<List<Object>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "boolean_prop":
booleanProp = reader.GetBoolean();
booleanProp = utf8JsonReader.GetBoolean();
break;
case "date_prop":
dateProp = JsonSerializer.Deserialize<DateTime?>(ref reader, options);
dateProp = JsonSerializer.Deserialize<DateTime?>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "datetime_prop":
datetimeProp = JsonSerializer.Deserialize<DateTime?>(ref reader, options);
datetimeProp = JsonSerializer.Deserialize<DateTime?>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "integer_prop":
if (reader.TokenType != JsonTokenType.Null)
integerProp = reader.GetInt32();
if (utf8JsonReader.TokenType != JsonTokenType.Null)
integerProp = utf8JsonReader.GetInt32();
break;
case "number_prop":
if (reader.TokenType != JsonTokenType.Null)
numberProp = reader.GetInt32();
if (utf8JsonReader.TokenType != JsonTokenType.Null)
numberProp = utf8JsonReader.GetInt32();
break;
case "object_and_items_nullable_prop":
objectAndItemsNullableProp = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref reader, options);
objectAndItemsNullableProp = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "object_nullable_prop":
objectNullableProp = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref reader, options);
objectNullableProp = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "string_prop":
stringProp = reader.GetString();
stringProp = utf8JsonReader.GetString();
break;
default:
break;
@ -283,28 +283,28 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="nullableClass"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, NullableClass nullableClass, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, NullableClass nullableClass, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("array_items_nullable");
JsonSerializer.Serialize(writer, nullableClass.ArrayItemsNullable, options);
JsonSerializer.Serialize(writer, nullableClass.ArrayItemsNullable, jsonSerializerOptions);
writer.WritePropertyName("object_items_nullable");
JsonSerializer.Serialize(writer, nullableClass.ObjectItemsNullable, options);
JsonSerializer.Serialize(writer, nullableClass.ObjectItemsNullable, jsonSerializerOptions);
writer.WritePropertyName("array_and_items_nullable_prop");
JsonSerializer.Serialize(writer, nullableClass.ArrayAndItemsNullableProp, options);
JsonSerializer.Serialize(writer, nullableClass.ArrayAndItemsNullableProp, jsonSerializerOptions);
writer.WritePropertyName("array_nullable_prop");
JsonSerializer.Serialize(writer, nullableClass.ArrayNullableProp, options);
JsonSerializer.Serialize(writer, nullableClass.ArrayNullableProp, jsonSerializerOptions);
if (nullableClass.BooleanProp != null)
writer.WriteBoolean("boolean_prop", nullableClass.BooleanProp.Value);
else
writer.WriteNull("boolean_prop");
writer.WritePropertyName("date_prop");
JsonSerializer.Serialize(writer, nullableClass.DateProp, options);
JsonSerializer.Serialize(writer, nullableClass.DateProp, jsonSerializerOptions);
writer.WritePropertyName("datetime_prop");
JsonSerializer.Serialize(writer, nullableClass.DatetimeProp, options);
JsonSerializer.Serialize(writer, nullableClass.DatetimeProp, jsonSerializerOptions);
if (nullableClass.IntegerProp != null)
writer.WriteNumber("integer_prop", nullableClass.IntegerProp.Value);
else
@ -314,9 +314,9 @@ namespace Org.OpenAPITools.Model
else
writer.WriteNull("number_prop");
writer.WritePropertyName("object_and_items_nullable_prop");
JsonSerializer.Serialize(writer, nullableClass.ObjectAndItemsNullableProp, options);
JsonSerializer.Serialize(writer, nullableClass.ObjectAndItemsNullableProp, jsonSerializerOptions);
writer.WritePropertyName("object_nullable_prop");
JsonSerializer.Serialize(writer, nullableClass.ObjectNullableProp, options);
JsonSerializer.Serialize(writer, nullableClass.ObjectNullableProp, jsonSerializerOptions);
writer.WriteString("string_prop", nullableClass.StringProp);
writer.WriteEndObject();

View File

@ -107,39 +107,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override NullableShape Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader triangleReader = reader;
bool triangleDeserialized = Client.ClientUtils.TryDeserialize<Triangle>(ref triangleReader, options, out Triangle? triangle);
Utf8JsonReader triangleReader = utf8JsonReader;
bool triangleDeserialized = Client.ClientUtils.TryDeserialize<Triangle>(ref triangleReader, jsonSerializerOptions, out Triangle? triangle);
Utf8JsonReader quadrilateralReader = reader;
bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize<Quadrilateral>(ref quadrilateralReader, options, out Quadrilateral? quadrilateral);
Utf8JsonReader quadrilateralReader = utf8JsonReader;
bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize<Quadrilateral>(ref quadrilateralReader, jsonSerializerOptions, out Quadrilateral? quadrilateral);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -163,9 +163,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="nullableShape"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override NumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
decimal justNumber = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "JustNumber":
justNumber = reader.GetInt32();
justNumber = utf8JsonReader.GetInt32();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="numberOnly"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, NumberOnly numberOnly, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, NumberOnly numberOnly, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -132,51 +132,51 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<string> bars = default;
DeprecatedObject deprecatedRef = default;
decimal id = default;
string uuid = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "bars":
bars = JsonSerializer.Deserialize<List<string>>(ref reader, options);
bars = JsonSerializer.Deserialize<List<string>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "deprecatedRef":
deprecatedRef = JsonSerializer.Deserialize<DeprecatedObject>(ref reader, options);
deprecatedRef = JsonSerializer.Deserialize<DeprecatedObject>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "id":
id = reader.GetInt32();
id = utf8JsonReader.GetInt32();
break;
case "uuid":
uuid = reader.GetString();
uuid = utf8JsonReader.GetString();
break;
default:
break;
@ -192,16 +192,16 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="objectWithDeprecatedFields"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ObjectWithDeprecatedFields objectWithDeprecatedFields, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ObjectWithDeprecatedFields objectWithDeprecatedFields, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("bars");
JsonSerializer.Serialize(writer, objectWithDeprecatedFields.Bars, options);
JsonSerializer.Serialize(writer, objectWithDeprecatedFields.Bars, jsonSerializerOptions);
writer.WritePropertyName("deprecatedRef");
JsonSerializer.Serialize(writer, objectWithDeprecatedFields.DeprecatedRef, options);
JsonSerializer.Serialize(writer, objectWithDeprecatedFields.DeprecatedRef, jsonSerializerOptions);
writer.WriteNumber("id", objectWithDeprecatedFields.Id);
writer.WriteString("uuid", objectWithDeprecatedFields.Uuid);

View File

@ -216,19 +216,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Order Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
long id = default;
long petId = default;
@ -237,39 +237,39 @@ namespace Org.OpenAPITools.Model
Order.StatusEnum status = default;
bool complete = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "id":
id = reader.GetInt64();
id = utf8JsonReader.GetInt64();
break;
case "petId":
petId = reader.GetInt64();
petId = utf8JsonReader.GetInt64();
break;
case "quantity":
quantity = reader.GetInt32();
quantity = utf8JsonReader.GetInt32();
break;
case "shipDate":
shipDate = JsonSerializer.Deserialize<DateTime>(ref reader, options);
shipDate = JsonSerializer.Deserialize<DateTime>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "status":
string statusRawValue = reader.GetString();
string statusRawValue = utf8JsonReader.GetString();
status = Order.StatusEnumFromString(statusRawValue);
break;
case "complete":
complete = reader.GetBoolean();
complete = utf8JsonReader.GetBoolean();
break;
default:
break;
@ -285,9 +285,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="order"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Order order, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Order order, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
@ -295,7 +295,7 @@ namespace Org.OpenAPITools.Model
writer.WriteNumber("petId", order.PetId);
writer.WriteNumber("quantity", order.Quantity);
writer.WritePropertyName("shipDate");
JsonSerializer.Serialize(writer, order.ShipDate, options);
JsonSerializer.Serialize(writer, order.ShipDate, jsonSerializerOptions);
var statusRawValue = Order.StatusEnumToJsonValue(order.Status);
if (statusRawValue != null)
writer.WriteString("status", statusRawValue);

View File

@ -117,47 +117,47 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override OuterComposite Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
bool myBoolean = default;
decimal myNumber = default;
string myString = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "my_boolean":
myBoolean = reader.GetBoolean();
myBoolean = utf8JsonReader.GetBoolean();
break;
case "my_number":
myNumber = reader.GetInt32();
myNumber = utf8JsonReader.GetInt32();
break;
case "my_string":
myString = reader.GetString();
myString = utf8JsonReader.GetString();
break;
default:
break;
@ -173,9 +173,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="outerComposite"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, OuterComposite outerComposite, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, OuterComposite outerComposite, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -61,39 +61,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ParentPet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string petType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "pet_type":
petType = reader.GetString();
petType = utf8JsonReader.GetString();
break;
default:
break;
@ -109,9 +109,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="parentPet"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -216,19 +216,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Pet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Category category = default;
long id = default;
@ -237,39 +237,39 @@ namespace Org.OpenAPITools.Model
Pet.StatusEnum status = default;
List<Tag> tags = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "category":
category = JsonSerializer.Deserialize<Category>(ref reader, options);
category = JsonSerializer.Deserialize<Category>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "id":
id = reader.GetInt64();
id = utf8JsonReader.GetInt64();
break;
case "name":
name = reader.GetString();
name = utf8JsonReader.GetString();
break;
case "photoUrls":
photoUrls = JsonSerializer.Deserialize<List<string>>(ref reader, options);
photoUrls = JsonSerializer.Deserialize<List<string>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "status":
string statusRawValue = reader.GetString();
string statusRawValue = utf8JsonReader.GetString();
status = Pet.StatusEnumFromString(statusRawValue);
break;
case "tags":
tags = JsonSerializer.Deserialize<List<Tag>>(ref reader, options);
tags = JsonSerializer.Deserialize<List<Tag>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -285,25 +285,25 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="pet"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Pet pet, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Pet pet, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("category");
JsonSerializer.Serialize(writer, pet.Category, options);
JsonSerializer.Serialize(writer, pet.Category, jsonSerializerOptions);
writer.WriteNumber("id", pet.Id);
writer.WriteString("name", pet.Name);
writer.WritePropertyName("photoUrls");
JsonSerializer.Serialize(writer, pet.PhotoUrls, options);
JsonSerializer.Serialize(writer, pet.PhotoUrls, jsonSerializerOptions);
var statusRawValue = Pet.StatusEnumToJsonValue(pet.Status);
if (statusRawValue != null)
writer.WriteString("status", statusRawValue);
else
writer.WriteNull("status");
writer.WritePropertyName("tags");
JsonSerializer.Serialize(writer, pet.Tags, options);
JsonSerializer.Serialize(writer, pet.Tags, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -107,39 +107,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Pig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader basquePigReader = reader;
bool basquePigDeserialized = Client.ClientUtils.TryDeserialize<BasquePig>(ref basquePigReader, options, out BasquePig? basquePig);
Utf8JsonReader basquePigReader = utf8JsonReader;
bool basquePigDeserialized = Client.ClientUtils.TryDeserialize<BasquePig>(ref basquePigReader, jsonSerializerOptions, out BasquePig? basquePig);
Utf8JsonReader danishPigReader = reader;
bool danishPigDeserialized = Client.ClientUtils.TryDeserialize<DanishPig>(ref danishPigReader, options, out DanishPig? danishPig);
Utf8JsonReader danishPigReader = utf8JsonReader;
bool danishPigDeserialized = Client.ClientUtils.TryDeserialize<DanishPig>(ref danishPigReader, jsonSerializerOptions, out DanishPig? danishPig);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -163,9 +163,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="pig"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -127,45 +127,45 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override PolymorphicProperty Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override PolymorphicProperty Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader _boolReader = reader;
bool _boolDeserialized = Client.ClientUtils.TryDeserialize<bool>(ref _boolReader, options, out bool _bool);
Utf8JsonReader _boolReader = utf8JsonReader;
bool _boolDeserialized = Client.ClientUtils.TryDeserialize<bool>(ref _boolReader, jsonSerializerOptions, out bool _bool);
Utf8JsonReader _stringReader = reader;
bool _stringDeserialized = Client.ClientUtils.TryDeserialize<string>(ref _stringReader, options, out string? _string);
Utf8JsonReader _stringReader = utf8JsonReader;
bool _stringDeserialized = Client.ClientUtils.TryDeserialize<string>(ref _stringReader, jsonSerializerOptions, out string? _string);
Utf8JsonReader _objectReader = reader;
bool _objectDeserialized = Client.ClientUtils.TryDeserialize<Object>(ref _objectReader, options, out Object? _object);
Utf8JsonReader _objectReader = utf8JsonReader;
bool _objectDeserialized = Client.ClientUtils.TryDeserialize<Object>(ref _objectReader, jsonSerializerOptions, out Object? _object);
Utf8JsonReader liststringReader = reader;
bool liststringDeserialized = Client.ClientUtils.TryDeserialize<List<string>>(ref liststringReader, options, out List<string>? liststring);
Utf8JsonReader liststringReader = utf8JsonReader;
bool liststringDeserialized = Client.ClientUtils.TryDeserialize<List<string>>(ref liststringReader, jsonSerializerOptions, out List<string>? liststring);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -195,9 +195,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="polymorphicProperty"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -107,39 +107,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Quadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader simpleQuadrilateralReader = reader;
bool simpleQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize<SimpleQuadrilateral>(ref simpleQuadrilateralReader, options, out SimpleQuadrilateral? simpleQuadrilateral);
Utf8JsonReader simpleQuadrilateralReader = utf8JsonReader;
bool simpleQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize<SimpleQuadrilateral>(ref simpleQuadrilateralReader, jsonSerializerOptions, out SimpleQuadrilateral? simpleQuadrilateral);
Utf8JsonReader complexQuadrilateralReader = reader;
bool complexQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize<ComplexQuadrilateral>(ref complexQuadrilateralReader, options, out ComplexQuadrilateral? complexQuadrilateral);
Utf8JsonReader complexQuadrilateralReader = utf8JsonReader;
bool complexQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize<ComplexQuadrilateral>(ref complexQuadrilateralReader, jsonSerializerOptions, out ComplexQuadrilateral? complexQuadrilateral);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -163,9 +163,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="quadrilateral"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override QuadrilateralInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string quadrilateralType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "quadrilateralType":
quadrilateralType = reader.GetString();
quadrilateralType = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="quadrilateralInterface"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, QuadrilateralInterface quadrilateralInterface, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, QuadrilateralInterface quadrilateralInterface, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -141,43 +141,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ReadOnlyFirst Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string bar = default;
string baz = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "bar":
bar = reader.GetString();
bar = utf8JsonReader.GetString();
break;
case "baz":
baz = reader.GetString();
baz = utf8JsonReader.GetString();
break;
default:
break;
@ -193,9 +193,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="readOnlyFirst"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ReadOnlyFirst readOnlyFirst, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ReadOnlyFirst readOnlyFirst, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Return Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
int returnProperty = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "return":
returnProperty = reader.GetInt32();
returnProperty = utf8JsonReader.GetInt32();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="_return"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Return _return, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Return _return, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -89,39 +89,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ScaleneTriangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader shapeInterfaceReader = reader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref reader, options, out ShapeInterface? shapeInterface);
Utf8JsonReader shapeInterfaceReader = utf8JsonReader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref utf8JsonReader, jsonSerializerOptions, out ShapeInterface? shapeInterface);
Utf8JsonReader triangleInterfaceReader = reader;
bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize<TriangleInterface>(ref reader, options, out TriangleInterface? triangleInterface);
Utf8JsonReader triangleInterfaceReader = utf8JsonReader;
bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize<TriangleInterface>(ref utf8JsonReader, jsonSerializerOptions, out TriangleInterface? triangleInterface);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="scaleneTriangle"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -136,45 +136,45 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Shape Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader triangleReader = reader;
bool triangleDeserialized = Client.ClientUtils.TryDeserialize<Triangle>(ref triangleReader, options, out Triangle? triangle);
Utf8JsonReader triangleReader = utf8JsonReader;
bool triangleDeserialized = Client.ClientUtils.TryDeserialize<Triangle>(ref triangleReader, jsonSerializerOptions, out Triangle? triangle);
Utf8JsonReader quadrilateralReader = reader;
bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize<Quadrilateral>(ref quadrilateralReader, options, out Quadrilateral? quadrilateral);
Utf8JsonReader quadrilateralReader = utf8JsonReader;
bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize<Quadrilateral>(ref quadrilateralReader, jsonSerializerOptions, out Quadrilateral? quadrilateral);
string quadrilateralType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "quadrilateralType":
quadrilateralType = reader.GetString();
quadrilateralType = utf8JsonReader.GetString();
break;
default:
break;
@ -196,9 +196,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="shape"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ShapeInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string shapeType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "shapeType":
shapeType = reader.GetString();
shapeType = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="shapeInterface"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ShapeInterface shapeInterface, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ShapeInterface shapeInterface, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -136,45 +136,45 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ShapeOrNull Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader triangleReader = reader;
bool triangleDeserialized = Client.ClientUtils.TryDeserialize<Triangle>(ref triangleReader, options, out Triangle? triangle);
Utf8JsonReader triangleReader = utf8JsonReader;
bool triangleDeserialized = Client.ClientUtils.TryDeserialize<Triangle>(ref triangleReader, jsonSerializerOptions, out Triangle? triangle);
Utf8JsonReader quadrilateralReader = reader;
bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize<Quadrilateral>(ref quadrilateralReader, options, out Quadrilateral? quadrilateral);
Utf8JsonReader quadrilateralReader = utf8JsonReader;
bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize<Quadrilateral>(ref quadrilateralReader, jsonSerializerOptions, out Quadrilateral? quadrilateral);
string quadrilateralType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "quadrilateralType":
quadrilateralType = reader.GetString();
quadrilateralType = utf8JsonReader.GetString();
break;
default:
break;
@ -196,9 +196,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="shapeOrNull"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -89,39 +89,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override SimpleQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader shapeInterfaceReader = reader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref reader, options, out ShapeInterface? shapeInterface);
Utf8JsonReader shapeInterfaceReader = utf8JsonReader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref utf8JsonReader, jsonSerializerOptions, out ShapeInterface? shapeInterface);
Utf8JsonReader quadrilateralInterfaceReader = reader;
bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize<QuadrilateralInterface>(ref reader, options, out QuadrilateralInterface? quadrilateralInterface);
Utf8JsonReader quadrilateralInterfaceReader = utf8JsonReader;
bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize<QuadrilateralInterface>(ref utf8JsonReader, jsonSerializerOptions, out QuadrilateralInterface? quadrilateralInterface);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="simpleQuadrilateral"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -105,43 +105,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override SpecialModelName Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string specialModelNameProperty = default;
long specialPropertyName = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "_special_model.name_":
specialModelNameProperty = reader.GetString();
specialModelNameProperty = utf8JsonReader.GetString();
break;
case "$special[property.name]":
specialPropertyName = reader.GetInt64();
specialPropertyName = utf8JsonReader.GetInt64();
break;
default:
break;
@ -157,9 +157,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="specialModelName"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, SpecialModelName specialModelName, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, SpecialModelName specialModelName, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -105,43 +105,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Tag Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
long id = default;
string name = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "id":
id = reader.GetInt64();
id = utf8JsonReader.GetInt64();
break;
case "name":
name = reader.GetString();
name = utf8JsonReader.GetString();
break;
default:
break;
@ -157,9 +157,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="tag"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Tag tag, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Tag tag, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -184,52 +184,52 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Triangle Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader equilateralTriangleReader = reader;
bool equilateralTriangleDeserialized = Client.ClientUtils.TryDeserialize<EquilateralTriangle>(ref equilateralTriangleReader, options, out EquilateralTriangle? equilateralTriangle);
Utf8JsonReader equilateralTriangleReader = utf8JsonReader;
bool equilateralTriangleDeserialized = Client.ClientUtils.TryDeserialize<EquilateralTriangle>(ref equilateralTriangleReader, jsonSerializerOptions, out EquilateralTriangle? equilateralTriangle);
Utf8JsonReader isoscelesTriangleReader = reader;
bool isoscelesTriangleDeserialized = Client.ClientUtils.TryDeserialize<IsoscelesTriangle>(ref isoscelesTriangleReader, options, out IsoscelesTriangle? isoscelesTriangle);
Utf8JsonReader isoscelesTriangleReader = utf8JsonReader;
bool isoscelesTriangleDeserialized = Client.ClientUtils.TryDeserialize<IsoscelesTriangle>(ref isoscelesTriangleReader, jsonSerializerOptions, out IsoscelesTriangle? isoscelesTriangle);
Utf8JsonReader scaleneTriangleReader = reader;
bool scaleneTriangleDeserialized = Client.ClientUtils.TryDeserialize<ScaleneTriangle>(ref scaleneTriangleReader, options, out ScaleneTriangle? scaleneTriangle);
Utf8JsonReader scaleneTriangleReader = utf8JsonReader;
bool scaleneTriangleDeserialized = Client.ClientUtils.TryDeserialize<ScaleneTriangle>(ref scaleneTriangleReader, jsonSerializerOptions, out ScaleneTriangle? scaleneTriangle);
string shapeType = default;
string triangleType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "shapeType":
shapeType = reader.GetString();
shapeType = utf8JsonReader.GetString();
break;
case "triangleType":
triangleType = reader.GetString();
triangleType = utf8JsonReader.GetString();
break;
default:
break;
@ -254,9 +254,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="triangle"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -93,39 +93,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override TriangleInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string triangleType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "triangleType":
triangleType = reader.GetString();
triangleType = utf8JsonReader.GetString();
break;
default:
break;
@ -141,9 +141,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="triangleInterface"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, TriangleInterface triangleInterface, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, TriangleInterface triangleInterface, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -221,19 +221,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override User Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string email = default;
string firstName = default;
@ -248,56 +248,56 @@ namespace Org.OpenAPITools.Model
Object anyTypePropNullable = default;
Object objectWithNoDeclaredPropsNullable = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "email":
email = reader.GetString();
email = utf8JsonReader.GetString();
break;
case "firstName":
firstName = reader.GetString();
firstName = utf8JsonReader.GetString();
break;
case "id":
id = reader.GetInt64();
id = utf8JsonReader.GetInt64();
break;
case "lastName":
lastName = reader.GetString();
lastName = utf8JsonReader.GetString();
break;
case "objectWithNoDeclaredProps":
objectWithNoDeclaredProps = JsonSerializer.Deserialize<Object>(ref reader, options);
objectWithNoDeclaredProps = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "password":
password = reader.GetString();
password = utf8JsonReader.GetString();
break;
case "phone":
phone = reader.GetString();
phone = utf8JsonReader.GetString();
break;
case "userStatus":
userStatus = reader.GetInt32();
userStatus = utf8JsonReader.GetInt32();
break;
case "username":
username = reader.GetString();
username = utf8JsonReader.GetString();
break;
case "anyTypeProp":
anyTypeProp = JsonSerializer.Deserialize<Object>(ref reader, options);
anyTypeProp = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "anyTypePropNullable":
anyTypePropNullable = JsonSerializer.Deserialize<Object>(ref reader, options);
anyTypePropNullable = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "objectWithNoDeclaredPropsNullable":
objectWithNoDeclaredPropsNullable = JsonSerializer.Deserialize<Object>(ref reader, options);
objectWithNoDeclaredPropsNullable = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -313,9 +313,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="user"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, User user, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, User user, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
@ -324,17 +324,17 @@ namespace Org.OpenAPITools.Model
writer.WriteNumber("id", user.Id);
writer.WriteString("lastName", user.LastName);
writer.WritePropertyName("objectWithNoDeclaredProps");
JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredProps, options);
JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredProps, jsonSerializerOptions);
writer.WriteString("password", user.Password);
writer.WriteString("phone", user.Phone);
writer.WriteNumber("userStatus", user.UserStatus);
writer.WriteString("username", user.Username);
writer.WritePropertyName("anyTypeProp");
JsonSerializer.Serialize(writer, user.AnyTypeProp, options);
JsonSerializer.Serialize(writer, user.AnyTypeProp, jsonSerializerOptions);
writer.WritePropertyName("anyTypePropNullable");
JsonSerializer.Serialize(writer, user.AnyTypePropNullable, options);
JsonSerializer.Serialize(writer, user.AnyTypePropNullable, jsonSerializerOptions);
writer.WritePropertyName("objectWithNoDeclaredPropsNullable");
JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredPropsNullable, options);
JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredPropsNullable, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -117,47 +117,47 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Whale Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string className = default;
bool hasBaleen = default;
bool hasTeeth = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
case "hasBaleen":
hasBaleen = reader.GetBoolean();
hasBaleen = utf8JsonReader.GetBoolean();
break;
case "hasTeeth":
hasTeeth = reader.GetBoolean();
hasTeeth = utf8JsonReader.GetBoolean();
break;
default:
break;
@ -173,9 +173,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="whale"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Whale whale, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Whale whale, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -167,43 +167,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Zebra Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string className = default;
Zebra.TypeEnum type = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string? propertyName = reader.GetString();
reader.Read();
string? propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
case "type":
string typeRawValue = reader.GetString();
string typeRawValue = utf8JsonReader.GetString();
type = Zebra.TypeEnumFromString(typeRawValue);
break;
default:
@ -220,9 +220,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="zebra"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Zebra zebra, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Zebra zebra, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Activity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Dictionary<string, List<ActivityOutputElementRepresentation>> activityOutputs = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "activity_outputs":
activityOutputs = JsonSerializer.Deserialize<Dictionary<string, List<ActivityOutputElementRepresentation>>>(ref reader, options);
activityOutputs = JsonSerializer.Deserialize<Dictionary<string, List<ActivityOutputElementRepresentation>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -139,14 +139,14 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="activity"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Activity activity, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Activity activity, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("activity_outputs");
JsonSerializer.Serialize(writer, activity.ActivityOutputs, options);
JsonSerializer.Serialize(writer, activity.ActivityOutputs, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -103,43 +103,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string prop1 = default;
Object prop2 = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "prop1":
prop1 = reader.GetString();
prop1 = utf8JsonReader.GetString();
break;
case "prop2":
prop2 = JsonSerializer.Deserialize<Object>(ref reader, options);
prop2 = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -155,15 +155,15 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="activityOutputElementRepresentation"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ActivityOutputElementRepresentation activityOutputElementRepresentation, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ActivityOutputElementRepresentation activityOutputElementRepresentation, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WriteString("prop1", activityOutputElementRepresentation.Prop1);
writer.WritePropertyName("prop2");
JsonSerializer.Serialize(writer, activityOutputElementRepresentation.Prop2, options);
JsonSerializer.Serialize(writer, activityOutputElementRepresentation.Prop2, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -173,19 +173,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override AdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Object emptyMap = default;
Dictionary<string, Dictionary<string, string>> mapOfMapProperty = default;
@ -196,44 +196,44 @@ namespace Org.OpenAPITools.Model
Dictionary<string, string> mapWithUndeclaredPropertiesString = default;
Object anytype1 = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "empty_map":
emptyMap = JsonSerializer.Deserialize<Object>(ref reader, options);
emptyMap = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_of_map_property":
mapOfMapProperty = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(ref reader, options);
mapOfMapProperty = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_property":
mapProperty = JsonSerializer.Deserialize<Dictionary<string, string>>(ref reader, options);
mapProperty = JsonSerializer.Deserialize<Dictionary<string, string>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_with_undeclared_properties_anytype_1":
mapWithUndeclaredPropertiesAnytype1 = JsonSerializer.Deserialize<Object>(ref reader, options);
mapWithUndeclaredPropertiesAnytype1 = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_with_undeclared_properties_anytype_2":
mapWithUndeclaredPropertiesAnytype2 = JsonSerializer.Deserialize<Object>(ref reader, options);
mapWithUndeclaredPropertiesAnytype2 = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_with_undeclared_properties_anytype_3":
mapWithUndeclaredPropertiesAnytype3 = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref reader, options);
mapWithUndeclaredPropertiesAnytype3 = JsonSerializer.Deserialize<Dictionary<string, Object>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "map_with_undeclared_properties_string":
mapWithUndeclaredPropertiesString = JsonSerializer.Deserialize<Dictionary<string, string>>(ref reader, options);
mapWithUndeclaredPropertiesString = JsonSerializer.Deserialize<Dictionary<string, string>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "anytype_1":
anytype1 = JsonSerializer.Deserialize<Object>(ref reader, options);
anytype1 = JsonSerializer.Deserialize<Object>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -249,28 +249,28 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="additionalPropertiesClass"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, AdditionalPropertiesClass additionalPropertiesClass, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, AdditionalPropertiesClass additionalPropertiesClass, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("empty_map");
JsonSerializer.Serialize(writer, additionalPropertiesClass.EmptyMap, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.EmptyMap, jsonSerializerOptions);
writer.WritePropertyName("map_of_map_property");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapOfMapProperty, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapOfMapProperty, jsonSerializerOptions);
writer.WritePropertyName("map_property");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapProperty, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapProperty, jsonSerializerOptions);
writer.WritePropertyName("map_with_undeclared_properties_anytype_1");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype1, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype1, jsonSerializerOptions);
writer.WritePropertyName("map_with_undeclared_properties_anytype_2");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype2, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype2, jsonSerializerOptions);
writer.WritePropertyName("map_with_undeclared_properties_anytype_3");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype3, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype3, jsonSerializerOptions);
writer.WritePropertyName("map_with_undeclared_properties_string");
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesString, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesString, jsonSerializerOptions);
writer.WritePropertyName("anytype_1");
JsonSerializer.Serialize(writer, additionalPropertiesClass.Anytype1, options);
JsonSerializer.Serialize(writer, additionalPropertiesClass.Anytype1, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -113,43 +113,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Animal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string className = default;
string color = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
case "color":
color = reader.GetString();
color = utf8JsonReader.GetString();
break;
default:
break;
@ -165,9 +165,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="animal"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Animal animal, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Animal animal, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -115,47 +115,47 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ApiResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
int code = default;
string message = default;
string type = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "code":
code = reader.GetInt32();
code = utf8JsonReader.GetInt32();
break;
case "message":
message = reader.GetString();
message = utf8JsonReader.GetString();
break;
case "type":
type = reader.GetString();
type = utf8JsonReader.GetString();
break;
default:
break;
@ -171,9 +171,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="apiResponse"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ApiResponse apiResponse, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ApiResponse apiResponse, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -117,43 +117,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Apple Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string cultivar = default;
string origin = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "cultivar":
cultivar = reader.GetString();
cultivar = utf8JsonReader.GetString();
break;
case "origin":
origin = reader.GetString();
origin = utf8JsonReader.GetString();
break;
default:
break;
@ -169,9 +169,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="apple"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Apple apple, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Apple apple, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -96,43 +96,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override AppleReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string cultivar = default;
bool mealy = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "cultivar":
cultivar = reader.GetString();
cultivar = utf8JsonReader.GetString();
break;
case "mealy":
mealy = reader.GetBoolean();
mealy = utf8JsonReader.GetBoolean();
break;
default:
break;
@ -148,9 +148,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="appleReq"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, AppleReq appleReq, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, AppleReq appleReq, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<List<decimal>> arrayArrayNumber = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "ArrayArrayNumber":
arrayArrayNumber = JsonSerializer.Deserialize<List<List<decimal>>>(ref reader, options);
arrayArrayNumber = JsonSerializer.Deserialize<List<List<decimal>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -139,14 +139,14 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="arrayOfArrayOfNumberOnly"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("ArrayArrayNumber");
JsonSerializer.Serialize(writer, arrayOfArrayOfNumberOnly.ArrayArrayNumber, options);
JsonSerializer.Serialize(writer, arrayOfArrayOfNumberOnly.ArrayArrayNumber, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<decimal> arrayNumber = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "ArrayNumber":
arrayNumber = JsonSerializer.Deserialize<List<decimal>>(ref reader, options);
arrayNumber = JsonSerializer.Deserialize<List<decimal>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -139,14 +139,14 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="arrayOfNumberOnly"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ArrayOfNumberOnly arrayOfNumberOnly, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ArrayOfNumberOnly arrayOfNumberOnly, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("ArrayNumber");
JsonSerializer.Serialize(writer, arrayOfNumberOnly.ArrayNumber, options);
JsonSerializer.Serialize(writer, arrayOfNumberOnly.ArrayNumber, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -115,47 +115,47 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ArrayTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
List<List<long>> arrayArrayOfInteger = default;
List<List<ReadOnlyFirst>> arrayArrayOfModel = default;
List<string> arrayOfString = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "array_array_of_integer":
arrayArrayOfInteger = JsonSerializer.Deserialize<List<List<long>>>(ref reader, options);
arrayArrayOfInteger = JsonSerializer.Deserialize<List<List<long>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "array_array_of_model":
arrayArrayOfModel = JsonSerializer.Deserialize<List<List<ReadOnlyFirst>>>(ref reader, options);
arrayArrayOfModel = JsonSerializer.Deserialize<List<List<ReadOnlyFirst>>>(ref utf8JsonReader, jsonSerializerOptions);
break;
case "array_of_string":
arrayOfString = JsonSerializer.Deserialize<List<string>>(ref reader, options);
arrayOfString = JsonSerializer.Deserialize<List<string>>(ref utf8JsonReader, jsonSerializerOptions);
break;
default:
break;
@ -171,18 +171,18 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="arrayTest"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ArrayTest arrayTest, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ArrayTest arrayTest, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();
writer.WritePropertyName("array_array_of_integer");
JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfInteger, options);
JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfInteger, jsonSerializerOptions);
writer.WritePropertyName("array_array_of_model");
JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfModel, options);
JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfModel, jsonSerializerOptions);
writer.WritePropertyName("array_of_string");
JsonSerializer.Serialize(writer, arrayTest.ArrayOfString, options);
JsonSerializer.Serialize(writer, arrayTest.ArrayOfString, jsonSerializerOptions);
writer.WriteEndObject();
}

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Banana Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
decimal lengthCm = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "lengthCm":
lengthCm = reader.GetInt32();
lengthCm = utf8JsonReader.GetInt32();
break;
default:
break;
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="banana"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Banana banana, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Banana banana, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -96,43 +96,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override BananaReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
decimal lengthCm = default;
bool sweet = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "lengthCm":
lengthCm = reader.GetInt32();
lengthCm = utf8JsonReader.GetInt32();
break;
case "sweet":
sweet = reader.GetBoolean();
sweet = utf8JsonReader.GetBoolean();
break;
default:
break;
@ -148,9 +148,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="bananaReq"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, BananaReq bananaReq, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, BananaReq bananaReq, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override BasquePig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string className = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
default:
break;
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="basquePig"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, BasquePig basquePig, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, BasquePig basquePig, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -152,19 +152,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Capitalization Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string aTTNAME = default;
string capitalCamel = default;
@ -173,38 +173,38 @@ namespace Org.OpenAPITools.Model
string smallCamel = default;
string smallSnake = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "ATT_NAME":
aTTNAME = reader.GetString();
aTTNAME = utf8JsonReader.GetString();
break;
case "CapitalCamel":
capitalCamel = reader.GetString();
capitalCamel = utf8JsonReader.GetString();
break;
case "Capital_Snake":
capitalSnake = reader.GetString();
capitalSnake = utf8JsonReader.GetString();
break;
case "SCA_ETH_Flow_Points":
sCAETHFlowPoints = reader.GetString();
sCAETHFlowPoints = utf8JsonReader.GetString();
break;
case "smallCamel":
smallCamel = reader.GetString();
smallCamel = utf8JsonReader.GetString();
break;
case "small_Snake":
smallSnake = reader.GetString();
smallSnake = utf8JsonReader.GetString();
break;
default:
break;
@ -220,9 +220,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="capitalization"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Capitalization capitalization, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Capitalization capitalization, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -74,49 +74,49 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Cat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader dictionaryReader = reader;
bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize<Dictionary<string, int>>(ref reader, options, out Dictionary<string, int> dictionary);
Utf8JsonReader dictionaryReader = utf8JsonReader;
bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize<Dictionary<string, int>>(ref utf8JsonReader, jsonSerializerOptions, out Dictionary<string, int> dictionary);
Utf8JsonReader catAllOfReader = reader;
bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize<CatAllOf>(ref reader, options, out CatAllOf catAllOf);
Utf8JsonReader catAllOfReader = utf8JsonReader;
bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize<CatAllOf>(ref utf8JsonReader, jsonSerializerOptions, out CatAllOf catAllOf);
string className = default;
string color = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
case "color":
color = reader.GetString();
color = utf8JsonReader.GetString();
break;
default:
break;
@ -132,9 +132,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="cat"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override CatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override CatAllOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
bool declawed = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "declawed":
declawed = reader.GetBoolean();
declawed = utf8JsonReader.GetBoolean();
break;
default:
break;
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="catAllOf"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, CatAllOf catAllOf, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, CatAllOf catAllOf, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -103,43 +103,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Category Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
long id = default;
string name = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "id":
id = reader.GetInt64();
id = utf8JsonReader.GetInt64();
break;
case "name":
name = reader.GetString();
name = utf8JsonReader.GetString();
break;
default:
break;
@ -155,9 +155,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="category"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Category category, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Category category, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -66,42 +66,42 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ChildCat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader childCatAllOfReader = reader;
bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize<ChildCatAllOf>(ref reader, options, out ChildCatAllOf childCatAllOf);
Utf8JsonReader childCatAllOfReader = utf8JsonReader;
bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize<ChildCatAllOf>(ref utf8JsonReader, jsonSerializerOptions, out ChildCatAllOf childCatAllOf);
string petType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "pet_type":
petType = reader.GetString();
petType = utf8JsonReader.GetString();
break;
default:
break;
@ -117,9 +117,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="childCat"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -142,43 +142,43 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ChildCatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ChildCatAllOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string name = default;
ChildCatAllOf.PetTypeEnum petType = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "name":
name = reader.GetString();
name = utf8JsonReader.GetString();
break;
case "pet_type":
string petTypeRawValue = reader.GetString();
string petTypeRawValue = utf8JsonReader.GetString();
petType = ChildCatAllOf.PetTypeEnumFromString(petTypeRawValue);
break;
default:
@ -195,9 +195,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="childCatAllOf"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ChildCatAllOf childCatAllOf, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ChildCatAllOf childCatAllOf, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ClassModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string classProperty = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "_class":
classProperty = reader.GetString();
classProperty = utf8JsonReader.GetString();
break;
default:
break;
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="classModel"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -87,39 +87,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override ComplexQuadrilateral Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader shapeInterfaceReader = reader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref reader, options, out ShapeInterface shapeInterface);
Utf8JsonReader shapeInterfaceReader = utf8JsonReader;
bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize<ShapeInterface>(ref utf8JsonReader, jsonSerializerOptions, out ShapeInterface shapeInterface);
Utf8JsonReader quadrilateralInterfaceReader = reader;
bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize<QuadrilateralInterface>(ref reader, options, out QuadrilateralInterface quadrilateralInterface);
Utf8JsonReader quadrilateralInterfaceReader = utf8JsonReader;
bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize<QuadrilateralInterface>(ref utf8JsonReader, jsonSerializerOptions, out QuadrilateralInterface quadrilateralInterface);
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
@ -137,9 +137,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="complexQuadrilateral"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override DanishPig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string className = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
default:
break;
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="danishPig"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, DanishPig danishPig, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, DanishPig danishPig, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override DeprecatedObject Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string name = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "name":
name = reader.GetString();
name = utf8JsonReader.GetString();
break;
default:
break;
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="deprecatedObject"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, DeprecatedObject deprecatedObject, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, DeprecatedObject deprecatedObject, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -67,46 +67,46 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override Dog Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Utf8JsonReader dogAllOfReader = reader;
bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize<DogAllOf>(ref reader, options, out DogAllOf dogAllOf);
Utf8JsonReader dogAllOfReader = utf8JsonReader;
bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize<DogAllOf>(ref utf8JsonReader, jsonSerializerOptions, out DogAllOf dogAllOf);
string className = default;
string color = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "className":
className = reader.GetString();
className = utf8JsonReader.GetString();
break;
case "color":
color = reader.GetString();
color = utf8JsonReader.GetString();
break;
default:
break;
@ -122,9 +122,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="dog"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

View File

@ -91,39 +91,39 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// A Json reader.
/// </summary>
/// <param name="reader"></param>
/// <param name="utf8JsonReader"></param>
/// <param name="typeToConvert"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <returns></returns>
/// <exception cref="JsonException"></exception>
public override DogAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
public override DogAllOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
{
int currentDepth = reader.CurrentDepth;
int currentDepth = utf8JsonReader.CurrentDepth;
if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray)
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
throw new JsonException();
JsonTokenType startingTokenType = reader.TokenType;
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
string breed = default;
while (reader.Read())
while (utf8JsonReader.Read())
{
if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth)
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
break;
if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1)
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
{
string propertyName = reader.GetString();
reader.Read();
string propertyName = utf8JsonReader.GetString();
utf8JsonReader.Read();
switch (propertyName)
{
case "breed":
breed = reader.GetString();
breed = utf8JsonReader.GetString();
break;
default:
break;
@ -139,9 +139,9 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="writer"></param>
/// <param name="dogAllOf"></param>
/// <param name="options"></param>
/// <param name="jsonSerializerOptions"></param>
/// <exception cref="NotImplementedException"></exception>
public override void Write(Utf8JsonWriter writer, DogAllOf dogAllOf, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, DogAllOf dogAllOf, JsonSerializerOptions jsonSerializerOptions)
{
writer.WriteStartObject();

Some files were not shown because too many files have changed in this diff Show More