Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 23, 2024
1 parent 194733a commit 08e6c0a
Show file tree
Hide file tree
Showing 18 changed files with 1,059 additions and 782 deletions.
49 changes: 49 additions & 0 deletions src/libs/LangSmith/Generated/JsonConverters.MissingMissing1.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#nullable enable

namespace OpenApiGenerator.JsonConverters
{
/// <inheritdoc />
public sealed class MissingMissing1JsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::LangSmith.MissingMissing1>
{
/// <inheritdoc />
public override global::LangSmith.MissingMissing1 Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::LangSmith.MissingMissing1Extensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::LangSmith.MissingMissing1)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::LangSmith.MissingMissing1 value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::LangSmith.MissingMissing1Extensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#nullable enable

namespace OpenApiGenerator.JsonConverters
{
/// <inheritdoc />
public sealed class MissingMissing1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::LangSmith.MissingMissing1?>
{
/// <inheritdoc />
public override global::LangSmith.MissingMissing1? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::LangSmith.MissingMissing1Extensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::LangSmith.MissingMissing1)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::LangSmith.MissingMissing1? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::LangSmith.MissingMissing1Extensions.ToValueString(value.Value));
}
}
}
}
2 changes: 2 additions & 0 deletions src/libs/LangSmith/Generated/JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ namespace LangSmith
typeof(global::OpenApiGenerator.JsonConverters.CustomChartTypeNullableJsonConverter),
typeof(global::OpenApiGenerator.JsonConverters.CustomChartMetricJsonConverter),
typeof(global::OpenApiGenerator.JsonConverters.CustomChartMetricNullableJsonConverter),
typeof(global::OpenApiGenerator.JsonConverters.MissingMissing1JsonConverter),
typeof(global::OpenApiGenerator.JsonConverters.MissingMissing1NullableJsonConverter),
typeof(global::OpenApiGenerator.JsonConverters.PaymentPlanTierJsonConverter),
typeof(global::OpenApiGenerator.JsonConverters.PaymentPlanTierNullableJsonConverter),
typeof(global::OpenApiGenerator.JsonConverters.ExampleListOrderJsonConverter),
Expand Down
Loading

0 comments on commit 08e6c0a

Please sign in to comment.