From 75fcb92829057712bff863c044302170fdb871da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 29 Aug 2026 05:35:40 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...JsonConverters.PredictionListResponse.g.cs | 141 ++++++----------- ...veSpeedAI.JsonConverters.TaskResponse.g.cs | 148 ++++++------------ ...SpeedAI.JsonConverters.UploadResponse.g.cs | 143 ++++++----------- .../WaveSpeedAI.JsonSerializerContext.g.cs | 1 + ...aveSpeedAI.JsonSerializerContextTypes.g.cs | 5 + 5 files changed, 153 insertions(+), 285 deletions(-) diff --git a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.PredictionListResponse.g.cs b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.PredictionListResponse.g.cs index eb453d6..be5ef0e 100644 --- a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.PredictionListResponse.g.cs +++ b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.PredictionListResponse.g.cs @@ -17,105 +17,34 @@ public class PredictionListResponseJsonConverter : global::System.Text.Json.Seri using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); - } - } - } + global::WaveSpeedAI.ApiResponse? api = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); + api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { } - var __score0 = 0; - if (__jsonProps.Contains("code")) __score0++; - if (__jsonProps.Contains("message")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("data")) __score1++; - if (__jsonProps.Contains("data.items")) __score1++; - if (__jsonProps.Contains("data.page")) __score1++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - - global::WaveSpeedAI.ApiResponse? api = default; global::WaveSpeedAI.PredictionListResponseVariant2? predictionListResponseVariant2 = default; - if (__bestIndex >= 0) + try { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.PredictionListResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.PredictionListResponseVariant2).Name}"); - predictionListResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.PredictionListResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.PredictionListResponseVariant2).Name}"); + predictionListResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } - - if (api == null && predictionListResponseVariant2 == null) + catch (global::System.Text.Json.JsonException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - - if (api == null && predictionListResponseVariant2 == null) + catch (global::System.InvalidOperationException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.PredictionListResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.PredictionListResponseVariant2).Name}"); - predictionListResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - var __value = new global::WaveSpeedAI.PredictionListResponse( api, @@ -134,18 +63,46 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + writer.WriteStartObject(); + var __writtenPropertyNames = new global::System.Collections.Generic.HashSet(global::System.StringComparer.Ordinal); if (value.IsApi) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Api!, typeInfo); + var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.Api!, typeInfo); + if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object) + { + throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); + } + + foreach (var __property in __element0.EnumerateObject()) + { + if (__writtenPropertyNames.Add(__property.Name)) + { + __property.WriteTo(writer); + } + } } - else if (value.IsPredictionListResponseVariant2) + if (value.IsPredictionListResponseVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.PredictionListResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.PredictionListResponseVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PredictionListResponseVariant2!, typeInfo); + var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PredictionListResponseVariant2!, typeInfo); + if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object) + { + throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); + } + + foreach (var __property in __element1.EnumerateObject()) + { + if (__writtenPropertyNames.Add(__property.Name)) + { + __property.WriteTo(writer); + } + } } + writer.WriteEndObject(); } } } \ No newline at end of file diff --git a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.TaskResponse.g.cs b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.TaskResponse.g.cs index 4d30c8f..60d2a4d 100644 --- a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.TaskResponse.g.cs +++ b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.TaskResponse.g.cs @@ -17,112 +17,34 @@ public class TaskResponseJsonConverter : global::System.Text.Json.Serialization. using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); - } - } - } + global::WaveSpeedAI.ApiResponse? api = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); + api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { } - var __score0 = 0; - if (__jsonProps.Contains("code")) __score0++; - if (__jsonProps.Contains("message")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("data")) __score1++; - if (__jsonProps.Contains("data.created_at")) __score1++; - if (__jsonProps.Contains("data.error")) __score1++; - if (__jsonProps.Contains("data.has_nsfw_contents")) __score1++; - if (__jsonProps.Contains("data.id")) __score1++; - if (__jsonProps.Contains("data.model")) __score1++; - if (__jsonProps.Contains("data.outputs")) __score1++; - if (__jsonProps.Contains("data.status")) __score1++; - if (__jsonProps.Contains("data.timings")) __score1++; - if (__jsonProps.Contains("data.urls")) __score1++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - - global::WaveSpeedAI.ApiResponse? api = default; global::WaveSpeedAI.TaskResponseVariant2? taskResponseVariant2 = default; - if (__bestIndex >= 0) + try { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.TaskResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.TaskResponseVariant2).Name}"); - taskResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.TaskResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.TaskResponseVariant2).Name}"); + taskResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } - - if (api == null && taskResponseVariant2 == null) + catch (global::System.Text.Json.JsonException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - - if (api == null && taskResponseVariant2 == null) + catch (global::System.InvalidOperationException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.TaskResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.TaskResponseVariant2).Name}"); - taskResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - var __value = new global::WaveSpeedAI.TaskResponse( api, @@ -141,18 +63,46 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + writer.WriteStartObject(); + var __writtenPropertyNames = new global::System.Collections.Generic.HashSet(global::System.StringComparer.Ordinal); if (value.IsApi) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Api!, typeInfo); + var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.Api!, typeInfo); + if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object) + { + throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); + } + + foreach (var __property in __element0.EnumerateObject()) + { + if (__writtenPropertyNames.Add(__property.Name)) + { + __property.WriteTo(writer); + } + } } - else if (value.IsTaskResponseVariant2) + if (value.IsTaskResponseVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.TaskResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.TaskResponseVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TaskResponseVariant2!, typeInfo); + var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.TaskResponseVariant2!, typeInfo); + if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object) + { + throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); + } + + foreach (var __property in __element1.EnumerateObject()) + { + if (__writtenPropertyNames.Add(__property.Name)) + { + __property.WriteTo(writer); + } + } } + writer.WriteEndObject(); } } } \ No newline at end of file diff --git a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.UploadResponse.g.cs b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.UploadResponse.g.cs index 498f142..7872c22 100644 --- a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.UploadResponse.g.cs +++ b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonConverters.UploadResponse.g.cs @@ -17,107 +17,34 @@ public class UploadResponseJsonConverter : global::System.Text.Json.Serializatio using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); - } - } - } + global::WaveSpeedAI.ApiResponse? api = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); + api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { } - var __score0 = 0; - if (__jsonProps.Contains("code")) __score0++; - if (__jsonProps.Contains("message")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("data")) __score1++; - if (__jsonProps.Contains("data.download_url")) __score1++; - if (__jsonProps.Contains("data.filename")) __score1++; - if (__jsonProps.Contains("data.size")) __score1++; - if (__jsonProps.Contains("data.type")) __score1++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - - global::WaveSpeedAI.ApiResponse? api = default; global::WaveSpeedAI.UploadResponseVariant2? uploadResponseVariant2 = default; - if (__bestIndex >= 0) + try { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.UploadResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.UploadResponseVariant2).Name}"); - uploadResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.UploadResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.UploadResponseVariant2).Name}"); + uploadResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } - - if (api == null && uploadResponseVariant2 == null) + catch (global::System.Text.Json.JsonException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - api = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - - if (api == null && uploadResponseVariant2 == null) + catch (global::System.InvalidOperationException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.UploadResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.UploadResponseVariant2).Name}"); - uploadResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - var __value = new global::WaveSpeedAI.UploadResponse( api, @@ -136,18 +63,46 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + writer.WriteStartObject(); + var __writtenPropertyNames = new global::System.Collections.Generic.HashSet(global::System.StringComparer.Ordinal); if (value.IsApi) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.ApiResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.ApiResponse).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Api!, typeInfo); + var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.Api!, typeInfo); + if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object) + { + throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); + } + + foreach (var __property in __element0.EnumerateObject()) + { + if (__writtenPropertyNames.Add(__property.Name)) + { + __property.WriteTo(writer); + } + } } - else if (value.IsUploadResponseVariant2) + if (value.IsUploadResponseVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::WaveSpeedAI.UploadResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::WaveSpeedAI.UploadResponseVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UploadResponseVariant2!, typeInfo); + var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.UploadResponseVariant2!, typeInfo); + if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object) + { + throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); + } + + foreach (var __property in __element1.EnumerateObject()) + { + if (__writtenPropertyNames.Add(__property.Name)) + { + __property.WriteTo(writer); + } + } } + writer.WriteEndObject(); } } } \ No newline at end of file diff --git a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonSerializerContext.g.cs b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonSerializerContext.g.cs index daa63de..1c9f871 100644 --- a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonSerializerContext.g.cs +++ b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonSerializerContext.g.cs @@ -46,6 +46,7 @@ namespace WaveSpeedAI typeof(global::WaveSpeedAI.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WaveSpeedAI.JsonSerializerContextTypes))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::WaveSpeedAI.ApiResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] diff --git a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonSerializerContextTypes.g.cs b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonSerializerContextTypes.g.cs index 59a8dd6..4df7671 100644 --- a/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonSerializerContextTypes.g.cs +++ b/src/libs/WaveSpeedAI/Generated/WaveSpeedAI.JsonSerializerContextTypes.g.cs @@ -20,6 +20,11 @@ public sealed partial class JsonSerializerContextTypes /// public global::System.Collections.Generic.Dictionary? StringObjectDictionary { get; set; } + /// + /// Runtime object lists used by dynamic JSON payloads such as tool arguments. + /// + public global::System.Collections.Generic.List? ObjectList { get; set; } + /// /// ///