diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs
index cf4f047..53ea7a6 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs
@@ -126,13 +126,13 @@ partial void ProcessReingestAllStoresResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.g.cs
index 185525f..7906455 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class AdminClient : global::Mixedbread.IAdminClient, globa
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs
index c6d6c34..e42ac1e 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs
@@ -72,7 +72,7 @@ partial void ProcessCreateApiKeyResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -109,13 +109,13 @@ partial void ProcessCreateApiKeyResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessCreateApiKeyResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ApiKeyCreated.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ApiKeyCreated.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -189,7 +189,7 @@ partial void ProcessCreateApiKeyResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ApiKeyCreated.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ApiKeyCreated.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs
index c895603..a3107d9 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs
@@ -102,13 +102,13 @@ partial void ProcessDeleteApiKeyResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessDeleteApiKeyResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ApiKeyDeleted.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ApiKeyDeleted.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessDeleteApiKeyResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ApiKeyDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ApiKeyDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs
index 5aaf644..f649336 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs
@@ -116,13 +116,13 @@ partial void ProcessListApiKeysResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -166,7 +166,7 @@ partial void ProcessListApiKeysResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ApiKeyListResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ApiKeyListResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -196,7 +196,7 @@ partial void ProcessListApiKeysResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ApiKeyListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ApiKeyListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs
index 64169db..51486e7 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs
@@ -103,13 +103,13 @@ partial void ProcessRerollApiKeyResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessRerollApiKeyResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ApiKeyCreated.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ApiKeyCreated.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -183,7 +183,7 @@ partial void ProcessRerollApiKeyResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ApiKeyCreated.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ApiKeyCreated.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs
index 4698fe4..44fc6ea 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs
@@ -102,13 +102,13 @@ partial void ProcessRetrieveApiKeyResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessRetrieveApiKeyResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessRetrieveApiKeyResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs
index 896c8b9..f30fcc8 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs
@@ -102,13 +102,13 @@ partial void ProcessRevokeApiKeyResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessRevokeApiKeyResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessRevokeApiKeyResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs
index 4b97a0d..7a5519f 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs
@@ -80,7 +80,7 @@ partial void ProcessUpdateApiKeyResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -118,13 +118,13 @@ partial void ProcessUpdateApiKeyResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -168,7 +168,7 @@ partial void ProcessUpdateApiKeyResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -198,7 +198,7 @@ partial void ProcessUpdateApiKeyResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.g.cs
index fc4a1df..356ef57 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class ApiKeysClient : global::Mixedbread.IApiKeysClient, g
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs
index f256fb3..3308bbd 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs
@@ -101,7 +101,7 @@ partial void ProcessGetBillingSummaryResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.BillingPeriodSummary.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.BillingPeriodSummary.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -131,7 +131,7 @@ partial void ProcessGetBillingSummaryResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.BillingPeriodSummary.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.BillingPeriodSummary.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs
index 47c77cd..7934d2a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs
@@ -101,7 +101,7 @@ partial void ProcessGetParsingCostHistogramResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.CostHistogramResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.CostHistogramResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -131,7 +131,7 @@ partial void ProcessGetParsingCostHistogramResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.CostHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.CostHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs
index 21338b8..457796a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs
@@ -97,13 +97,13 @@ partial void ProcessGetStoreCostHistogramResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessGetStoreCostHistogramResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.CostHistogramResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.CostHistogramResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -177,7 +177,7 @@ partial void ProcessGetStoreCostHistogramResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.CostHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.CostHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs
index 0dfa9de..f31f64d 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs
@@ -101,7 +101,7 @@ partial void ProcessListStoreCostInfoResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.StoreCostListResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.StoreCostListResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -131,7 +131,7 @@ partial void ProcessListStoreCostInfoResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.StoreCostListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.StoreCostListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.g.cs
index b22751e..205ea97 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class BillingClient : global::Mixedbread.IBillingClient, g
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.g.cs
index bebe97e..727f90a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class CompletionsClient : global::Mixedbread.ICompletionsC
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs
index 2e86e2c..9932208 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs
@@ -108,13 +108,13 @@ partial void ProcessAuthorizeDataSourceResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs
index aededbd..c71687d 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs
@@ -80,7 +80,7 @@ partial void ProcessCreateConnectorResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -118,13 +118,13 @@ partial void ProcessCreateConnectorResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -168,7 +168,7 @@ partial void ProcessCreateConnectorResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -198,7 +198,7 @@ partial void ProcessCreateConnectorResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs
index 558cf83..7c0240a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs
@@ -70,7 +70,7 @@ partial void ProcessCreateDataSourceResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -107,13 +107,13 @@ partial void ProcessCreateDataSourceResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -157,7 +157,7 @@ partial void ProcessCreateDataSourceResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSource.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -187,7 +187,7 @@ partial void ProcessCreateDataSourceResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs
index 4496a6b..26c617c 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs
@@ -111,13 +111,13 @@ partial void ProcessDeleteConnectorResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -161,7 +161,7 @@ partial void ProcessDeleteConnectorResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSourceConnectorDeleted.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSourceConnectorDeleted.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -191,7 +191,7 @@ partial void ProcessDeleteConnectorResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSourceConnectorDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSourceConnectorDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs
index a9cd384..0d4bd84 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs
@@ -100,13 +100,13 @@ partial void ProcessDeleteDataSourceResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -150,7 +150,7 @@ partial void ProcessDeleteDataSourceResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSourceDeleted.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSourceDeleted.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -180,7 +180,7 @@ partial void ProcessDeleteDataSourceResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSourceDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSourceDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs
index 49dc7e6..d058abd 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs
@@ -111,13 +111,13 @@ partial void ProcessGetConnectorResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -161,7 +161,7 @@ partial void ProcessGetConnectorResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -191,7 +191,7 @@ partial void ProcessGetConnectorResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs
index cfb9cf9..236f69e 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs
@@ -102,13 +102,13 @@ partial void ProcessGetDataSourceResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessGetDataSourceResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSource.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessGetDataSourceResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs
index 99948af..f3502f9 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs
@@ -143,13 +143,13 @@ partial void ProcessListConnectorsResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -193,7 +193,7 @@ partial void ProcessListConnectorsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ConnectorListResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ConnectorListResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -223,7 +223,7 @@ partial void ProcessListConnectorsResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ConnectorListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ConnectorListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs
index 5c95263..d5fc8c4 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs
@@ -132,13 +132,13 @@ partial void ProcessListDataSourcesResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessListDataSourcesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSourceListResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSourceListResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -212,7 +212,7 @@ partial void ProcessListDataSourcesResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSourceListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSourceListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs
index 6302e98..fc70a4e 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs
@@ -136,13 +136,13 @@ partial void ProcessOauth2CallbackResponse(
if (ReadResponseAsString)
{
__content_307 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_307 = global::System.Text.Json.JsonSerializer.Deserialize(__content_307, JsonSerializerOptions);
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
}
else
{
__content_307 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_307 = global::System.Text.Json.JsonSerializer.Deserialize(__content_307, JsonSerializerOptions);
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -240,13 +240,13 @@ partial void ProcessOauth2CallbackResponse(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs
index 841e7ea..30d60c1 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs
@@ -88,7 +88,7 @@ partial void ProcessUpdateConnectorResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -127,13 +127,13 @@ partial void ProcessUpdateConnectorResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -177,7 +177,7 @@ partial void ProcessUpdateConnectorResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -207,7 +207,7 @@ partial void ProcessUpdateConnectorResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs
index bc79cc0..7475b12 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs
@@ -78,7 +78,7 @@ partial void ProcessUpdateDataSourceResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,13 +116,13 @@ partial void ProcessUpdateDataSourceResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -166,7 +166,7 @@ partial void ProcessUpdateDataSourceResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.DataSource.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.DataSource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -196,7 +196,7 @@ partial void ProcessUpdateDataSourceResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.g.cs
index b5e0766..613304d 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class DataSourcesClient : global::Mixedbread.IDataSourcesC
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs
index f0ee0f8..3e389a4 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs
@@ -72,7 +72,7 @@ partial void ProcessCreateExtractionJobResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -109,13 +109,13 @@ partial void ProcessCreateExtractionJobResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessCreateExtractionJobResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ExtractionJob.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ExtractionJob.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -189,7 +189,7 @@ partial void ProcessCreateExtractionJobResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ExtractionJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ExtractionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs
index cad5516..fb09c97 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs
@@ -72,7 +72,7 @@ partial void ProcessCreateSchemaResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -109,13 +109,13 @@ partial void ProcessCreateSchemaResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessCreateSchemaResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.CreatedJsonSchema.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.CreatedJsonSchema.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -189,7 +189,7 @@ partial void ProcessCreateSchemaResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.CreatedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.CreatedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs
index 0e3bec2..c9e0ec4 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs
@@ -72,7 +72,7 @@ partial void ProcessEnhanceSchemaResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -109,13 +109,13 @@ partial void ProcessEnhanceSchemaResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessEnhanceSchemaResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.EnhancedJsonSchema.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.EnhancedJsonSchema.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -189,7 +189,7 @@ partial void ProcessEnhanceSchemaResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.EnhancedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.EnhancedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs
index c5759fa..cc43409 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs
@@ -72,7 +72,7 @@ partial void ProcessExtractContentResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -109,13 +109,13 @@ partial void ProcessExtractContentResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessExtractContentResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ExtractionResult.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ExtractionResult.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -189,7 +189,7 @@ partial void ProcessExtractContentResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ExtractionResult.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ExtractionResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs
index 269c521..f2c9fde 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs
@@ -102,13 +102,13 @@ partial void ProcessRetrieveExtractionJobResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessRetrieveExtractionJobResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ExtractionJob.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ExtractionJob.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessRetrieveExtractionJobResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ExtractionJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ExtractionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs
index cc4eac7..c9a683a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs
@@ -72,7 +72,7 @@ partial void ProcessValidateSchemaResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -109,13 +109,13 @@ partial void ProcessValidateSchemaResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessValidateSchemaResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.ValidatedJsonSchema.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.ValidatedJsonSchema.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -189,7 +189,7 @@ partial void ProcessValidateSchemaResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.ValidatedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.ValidatedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.g.cs
index 87d9f8f..b2288d1 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class ExtractionsClient : global::Mixedbread.IExtractionsC
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs
index b126cfd..9b95abb 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs
@@ -98,13 +98,13 @@ partial void ProcessAbortMultipartUploadResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessAbortMultipartUploadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.FileDeleted.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.FileDeleted.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -178,7 +178,7 @@ partial void ProcessAbortMultipartUploadResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.FileDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.FileDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs
index 0aeaef7..17d1efa 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs
@@ -76,7 +76,7 @@ partial void ProcessCompleteMultipartUploadResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -114,13 +114,13 @@ partial void ProcessCompleteMultipartUploadResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -164,7 +164,7 @@ partial void ProcessCompleteMultipartUploadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.FileObject.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.FileObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -194,7 +194,7 @@ partial void ProcessCompleteMultipartUploadResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs
index 1d9fecd..21c68a4 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs
@@ -114,13 +114,13 @@ partial void ProcessCreateFileResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -164,7 +164,7 @@ partial void ProcessCreateFileResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.FileObject.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.FileObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -194,7 +194,7 @@ partial void ProcessCreateFileResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs
index c489b95..bda3f39 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs
@@ -68,7 +68,7 @@ partial void ProcessCreateMultipartUploadResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -105,13 +105,13 @@ partial void ProcessCreateMultipartUploadResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -155,7 +155,7 @@ partial void ProcessCreateMultipartUploadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.CreateMultipartUploadResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.CreateMultipartUploadResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -185,7 +185,7 @@ partial void ProcessCreateMultipartUploadResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.CreateMultipartUploadResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.CreateMultipartUploadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs
index 927f5c1..00488a0 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs
@@ -102,13 +102,13 @@ partial void ProcessDeleteFileResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessDeleteFileResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.FileDeleted.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.FileDeleted.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessDeleteFileResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.FileDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.FileDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs
index 8ef4661..aeecdfe 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs
@@ -102,13 +102,13 @@ partial void ProcessDownloadFileResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs
index e1d3a09..fe06b00 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs
@@ -98,13 +98,13 @@ partial void ProcessGetMultipartUploadResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessGetMultipartUploadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.MultipartUploadDetailResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.MultipartUploadDetailResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -178,7 +178,7 @@ partial void ProcessGetMultipartUploadResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.MultipartUploadDetailResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.MultipartUploadDetailResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs
index c3ddf35..3d036a1 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs
@@ -143,13 +143,13 @@ partial void ProcessListFilesResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -193,7 +193,7 @@ partial void ProcessListFilesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.FileListResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.FileListResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -223,7 +223,7 @@ partial void ProcessListFilesResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.FileListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.FileListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs
index 706926e..05e39b0 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs
@@ -102,7 +102,7 @@ partial void ProcessListMultipartUploadsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.MultipartUploadListResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.MultipartUploadListResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -132,7 +132,7 @@ partial void ProcessListMultipartUploadsResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.MultipartUploadListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.MultipartUploadListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs
index 3384c14..f832475 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs
@@ -102,13 +102,13 @@ partial void ProcessRetrieveFileResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessRetrieveFileResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.FileObject.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.FileObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessRetrieveFileResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs
index 888af5b..f5c6906 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs
@@ -126,13 +126,13 @@ partial void ProcessUpdateFileResponseContent(
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -176,7 +176,7 @@ partial void ProcessUpdateFileResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Mixedbread.FileObject.FromJson(__content, JsonSerializerOptions) ??
+ global::Mixedbread.FileObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -206,7 +206,7 @@ partial void ProcessUpdateFileResponseContent(
).ConfigureAwait(false);
return
- await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.g.cs
index c953449..861b755 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class FilesClient : global::Mixedbread.IFilesClient, globa
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IAdminClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IAdminClient.g.cs
index 1354af0..55583c0 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IAdminClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IAdminClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IAdminClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IApiKeysClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IApiKeysClient.g.cs
index 07617ef..faf2668 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IApiKeysClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IApiKeysClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IApiKeysClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IBillingClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IBillingClient.g.cs
index 89cdd8e..ca66cd0 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IBillingClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IBillingClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IBillingClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ICompletionsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ICompletionsClient.g.cs
index 504dc25..e2a3100 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ICompletionsClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ICompletionsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface ICompletionsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IDataSourcesClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IDataSourcesClient.g.cs
index e3c7349..f039841 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IDataSourcesClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IDataSourcesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IDataSourcesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IExtractionsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IExtractionsClient.g.cs
index b91c980..705f678 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IExtractionsClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IExtractionsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IExtractionsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IFilesClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IFilesClient.g.cs
index 40185cb..85c3006 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IFilesClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IFilesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IFilesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs
index 6f53d30..471794b 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IMixedbreadClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IParsingClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IParsingClient.g.cs
index feecd1f..7633e0a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IParsingClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IParsingClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IParsingClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ISchemasClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ISchemasClient.g.cs
index 923624c..f384659 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.ISchemasClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.ISchemasClient.g.cs
@@ -36,7 +36,7 @@ public partial interface ISchemasClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.g.cs
index 067a264..eaac466 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IStoresClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf2.g.cs
index 817e1db..487dc01 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf2.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf2.g.cs
@@ -3,7 +3,7 @@
namespace Mixedbread.JsonConverters
{
///
- public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter>
+ public class AnyOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2> : global::System.Text.Json.Serialization.JsonConverter>
{
///
public override global::Mixedbread.AnyOf Read(
@@ -11,7 +11,8 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -26,7 +27,27 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
}
var __score0 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score0++;
+ }
+ }
+ }
var __score1 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score1++;
+ }
+ }
+ }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -41,7 +62,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -56,7 +79,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -72,7 +97,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -84,7 +111,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -109,15 +138,20 @@ public override void Write(
global::Mixedbread.AnyOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsValue1)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
}
else if (value.IsValue2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf3.g.cs
index b9f60c1..7141b37 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf3.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf3.g.cs
@@ -3,7 +3,7 @@
namespace Mixedbread.JsonConverters
{
///
- public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter>
+ public class AnyOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T3> : global::System.Text.Json.Serialization.JsonConverter>
{
///
public override global::Mixedbread.AnyOf Read(
@@ -11,7 +11,8 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -26,8 +27,38 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
}
var __score0 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score0++;
+ }
+ }
+ }
var __score1 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score1++;
+ }
+ }
+ }
var __score2 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T3), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score2++;
+ }
+ }
+ }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -44,7 +75,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -59,7 +92,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -74,7 +109,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -90,7 +127,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -102,7 +141,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -114,7 +155,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -141,19 +184,26 @@ public override void Write(
global::Mixedbread.AnyOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsValue1)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
}
else if (value.IsValue2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
}
else if (value.IsValue3)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeof(T3), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf4.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf4.g.cs
index f2cdb8b..adecde0 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf4.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf4.g.cs
@@ -3,7 +3,7 @@
namespace Mixedbread.JsonConverters
{
///
- public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter>
+ public class AnyOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T3, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T4> : global::System.Text.Json.Serialization.JsonConverter>
{
///
public override global::Mixedbread.AnyOf Read(
@@ -11,7 +11,8 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -26,9 +27,49 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
}
var __score0 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score0++;
+ }
+ }
+ }
var __score1 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score1++;
+ }
+ }
+ }
var __score2 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T3), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score2++;
+ }
+ }
+ }
var __score3 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T4), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score3++;
+ }
+ }
+ }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -47,7 +88,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -62,7 +105,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -77,7 +122,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
try
{
- value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -92,7 +139,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
try
{
- value4 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}");
+ value4 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -108,7 +157,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -120,7 +171,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -132,7 +185,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
try
{
- value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -144,7 +199,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria
try
{
- value4 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}");
+ value4 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -173,23 +230,32 @@ public override void Write(
global::Mixedbread.AnyOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsValue1)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
}
else if (value.IsValue2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
}
else if (value.IsValue3)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeof(T3), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo);
}
else if (value.IsValue4)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeof(T4), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant1.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant1.g.cs
index 6acacf3..9fa5d63 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant1.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant1.g.cs
@@ -12,21 +12,28 @@ public class AuthParamsVariant1JsonConverter : global::System.Text.Json.Serializ
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceAuthParamsVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.DataSourceAuthParamsVariant1Discriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.DataSourceOAuth2Params? oauth2 = default;
if (discriminator?.Type == global::Mixedbread.DataSourceAuthParamsVariant1DiscriminatorType.Oauth2)
{
- oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceOAuth2Params), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.DataSourceOAuth2Params)}");
+ oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.DataSourceApiKeyParams? apiKey = default;
if (discriminator?.Type == global::Mixedbread.DataSourceAuthParamsVariant1DiscriminatorType.ApiKey)
{
- apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceApiKeyParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.DataSourceApiKeyParams)}");
+ apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.AuthParamsVariant1(
@@ -45,15 +52,20 @@ public override void Write(
global::Mixedbread.AuthParamsVariant1 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsOauth2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2, typeof(global::Mixedbread.DataSourceOAuth2Params), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceOAuth2Params), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.DataSourceOAuth2Params).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2!, typeInfo);
}
else if (value.IsApiKey)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey, typeof(global::Mixedbread.DataSourceApiKeyParams), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceApiKeyParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.DataSourceApiKeyParams).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant12.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant12.g.cs
index ab1331e..adf526a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant12.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant12.g.cs
@@ -12,16 +12,21 @@ public class AuthParamsVariant12JsonConverter : global::System.Text.Json.Seriali
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.OAuth2CreateOrUpdateParams? oauth2 = default;
if (discriminator?.Type == global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType.Oauth2)
{
- oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.OAuth2CreateOrUpdateParams)}");
+ oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.AuthParamsVariant12(
@@ -38,11 +43,14 @@ public override void Write(
global::Mixedbread.AuthParamsVariant12 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsOauth2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2, typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.OAuth2CreateOrUpdateParams).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant13.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant13.g.cs
index 6f68b89..59cd691 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant13.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant13.g.cs
@@ -12,21 +12,28 @@ public class AuthParamsVariant13JsonConverter : global::System.Text.Json.Seriali
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.OAuth2CreateOrUpdateParams? oauth2 = default;
if (discriminator?.Type == global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType.Oauth2)
{
- oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.OAuth2CreateOrUpdateParams)}");
+ oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.ApiKeyCreateOrUpdateParams? apiKey = default;
if (discriminator?.Type == global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType.ApiKey)
{
- apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ApiKeyCreateOrUpdateParams)}");
+ apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.AuthParamsVariant13(
@@ -45,15 +52,20 @@ public override void Write(
global::Mixedbread.AuthParamsVariant13 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsOauth2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2, typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.OAuth2CreateOrUpdateParams).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2!, typeInfo);
}
else if (value.IsApiKey)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey, typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item.g.cs
index 3777c27..5122357 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item.g.cs
@@ -12,31 +12,42 @@ public class ChunksVariant1ItemJsonConverter : global::System.Text.Json.Serializ
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk? text = default;
if (discriminator?.Type == global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType.Text)
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk)}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk? imageUrl = default;
if (discriminator?.Type == global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType.ImageUrl)
{
- imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk)}");
+ imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk? audioUrl = default;
if (discriminator?.Type == global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType.AudioUrl)
{
- audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk)}");
+ audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk? videoUrl = default;
if (discriminator?.Type == global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType.VideoUrl)
{
- videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk)}");
+ videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.ChunksVariant1Item(
@@ -59,23 +70,32 @@ public override void Write(
global::Mixedbread.ChunksVariant1Item value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsText)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo);
}
else if (value.IsImageUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo);
}
else if (value.IsAudioUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo);
}
else if (value.IsVideoUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item2.g.cs
index cb562a8..c5cd330 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item2.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item2.g.cs
@@ -12,31 +12,42 @@ public class ChunksVariant1Item2JsonConverter : global::System.Text.Json.Seriali
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk? text = default;
if (discriminator?.Type == global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType.Text)
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk)}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk? imageUrl = default;
if (discriminator?.Type == global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType.ImageUrl)
{
- imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk)}");
+ imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk? audioUrl = default;
if (discriminator?.Type == global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType.AudioUrl)
{
- audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk)}");
+ audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk? videoUrl = default;
if (discriminator?.Type == global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType.VideoUrl)
{
- videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk)}");
+ videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.ChunksVariant1Item2(
@@ -59,23 +70,32 @@ public override void Write(
global::Mixedbread.ChunksVariant1Item2 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsText)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo);
}
else if (value.IsImageUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo);
}
else if (value.IsAudioUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo);
}
else if (value.IsVideoUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item3.g.cs
index 0cbd90d..864f58f 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item3.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item3.g.cs
@@ -12,31 +12,42 @@ public class ChunksVariant1Item3JsonConverter : global::System.Text.Json.Seriali
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreFileChunksVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreFileChunksVariant1ItemDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.TextInputChunk? text = default;
if (discriminator?.Type == global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType.Text)
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextInputChunk)}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.ImageUrlInputChunk? imageUrl = default;
if (discriminator?.Type == global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType.ImageUrl)
{
- imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageUrlInputChunk)}");
+ imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.AudioUrlInputChunk? audioUrl = default;
if (discriminator?.Type == global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType.AudioUrl)
{
- audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioUrlInputChunk)}");
+ audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.VideoUrlInputChunk? videoUrl = default;
if (discriminator?.Type == global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType.VideoUrl)
{
- videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoUrlInputChunk)}");
+ videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.ChunksVariant1Item3(
@@ -59,23 +70,32 @@ public override void Write(
global::Mixedbread.ChunksVariant1Item3 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsText)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo);
}
else if (value.IsImageUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.ImageUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo);
}
else if (value.IsAudioUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.AudioUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo);
}
else if (value.IsVideoUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.VideoUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item4.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item4.g.cs
index c1b6edc..f140704 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item4.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item4.g.cs
@@ -12,31 +12,42 @@ public class ChunksVariant1Item4JsonConverter : global::System.Text.Json.Seriali
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.TextInputChunk? text = default;
if (discriminator?.Type == global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType.Text)
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextInputChunk)}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.ImageUrlInputChunk? imageUrl = default;
if (discriminator?.Type == global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType.ImageUrl)
{
- imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageUrlInputChunk)}");
+ imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.AudioUrlInputChunk? audioUrl = default;
if (discriminator?.Type == global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType.AudioUrl)
{
- audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioUrlInputChunk)}");
+ audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.VideoUrlInputChunk? videoUrl = default;
if (discriminator?.Type == global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType.VideoUrl)
{
- videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoUrlInputChunk)}");
+ videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.ChunksVariant1Item4(
@@ -59,23 +70,32 @@ public override void Write(
global::Mixedbread.ChunksVariant1Item4 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsText)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo);
}
else if (value.IsImageUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.ImageUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo);
}
else if (value.IsAudioUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.AudioUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo);
}
else if (value.IsVideoUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.VideoUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs
index f645d48..01935a1 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs
@@ -12,21 +12,28 @@ public class DataItemJsonConverter : global::System.Text.Json.Serialization.Json
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreEventListResponseDataItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreEventListResponseDataItemDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.StoreIngestionEvent? ingestion = default;
if (discriminator?.Type == global::Mixedbread.StoreEventListResponseDataItemDiscriminatorType.Ingestion)
{
- ingestion = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreIngestionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreIngestionEvent)}");
+ ingestion = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.StoreSearchEvent? search = default;
if (discriminator?.Type == global::Mixedbread.StoreEventListResponseDataItemDiscriminatorType.Search)
{
- search = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreSearchEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreSearchEvent)}");
+ search = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.DataItem(
@@ -45,15 +52,20 @@ public override void Write(
global::Mixedbread.DataItem value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsIngestion)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Ingestion, typeof(global::Mixedbread.StoreIngestionEvent), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreIngestionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.StoreIngestionEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Ingestion!, typeInfo);
}
else if (value.IsSearch)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Search, typeof(global::Mixedbread.StoreSearchEvent), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreSearchEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.StoreSearchEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Search!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem2.g.cs
index 038432c..0e18972 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem2.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem2.g.cs
@@ -12,31 +12,42 @@ public class DataItem2JsonConverter : global::System.Text.Json.Serialization.Jso
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreSearchResponseDataItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreSearchResponseDataItemDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk? text = default;
if (discriminator?.Type == global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType.Text)
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk)}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk? imageUrl = default;
if (discriminator?.Type == global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType.ImageUrl)
{
- imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk)}");
+ imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk? audioUrl = default;
if (discriminator?.Type == global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType.AudioUrl)
{
- audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk)}");
+ audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk? videoUrl = default;
if (discriminator?.Type == global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType.VideoUrl)
{
- videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk)}");
+ videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.DataItem2(
@@ -59,23 +70,32 @@ public override void Write(
global::Mixedbread.DataItem2 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsText)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo);
}
else if (value.IsImageUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo);
}
else if (value.IsAudioUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo);
}
else if (value.IsVideoUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem3.g.cs
index d859ef5..e21a363 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem3.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem3.g.cs
@@ -12,31 +12,42 @@ public class DataItem3JsonConverter : global::System.Text.Json.Serialization.Jso
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk? text = default;
if (discriminator?.Type == global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType.Text)
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk)}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk? imageUrl = default;
if (discriminator?.Type == global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType.ImageUrl)
{
- imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk)}");
+ imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk? audioUrl = default;
if (discriminator?.Type == global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType.AudioUrl)
{
- audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk)}");
+ audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk? videoUrl = default;
if (discriminator?.Type == global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType.VideoUrl)
{
- videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk)}");
+ videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.DataItem3(
@@ -59,23 +70,32 @@ public override void Write(
global::Mixedbread.DataItem3 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsText)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo);
}
else if (value.IsImageUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo);
}
else if (value.IsAudioUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo);
}
else if (value.IsVideoUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule.g.cs
index 0017032..4a6ce39 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule.g.cs
@@ -12,31 +12,42 @@ public class DeletedRuleJsonConverter : global::System.Text.Json.Serialization.J
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.QueryStringSubstitutionRule? queryString = default;
if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.QueryString)
{
- queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}");
+ queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default;
if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.QueryRegex)
{
- queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}");
+ queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default;
if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.ChunkSearchResult)
{
- chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}");
+ chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.FileSearchResultRule? fileSearchResult = default;
if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.FileSearchResult)
{
- fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}");
+ fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.DeletedRule(
@@ -59,23 +70,32 @@ public override void Write(
global::Mixedbread.DeletedRule value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsQueryString)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo);
}
else if (value.IsQueryRegex)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo);
}
else if (value.IsChunkSearchResult)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo);
}
else if (value.IsFileSearchResult)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule2.g.cs
index 3da2a65..ef1ce7a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule2.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule2.g.cs
@@ -12,31 +12,42 @@ public class DeletedRule2JsonConverter : global::System.Text.Json.Serialization.
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
var readerCopy = reader;
- var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options);
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
global::Mixedbread.QueryStringSubstitutionRule? queryString = default;
if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.QueryString)
{
- queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}");
+ queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default;
if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.QueryRegex)
{
- queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}");
+ queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default;
if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.ChunkSearchResult)
{
- chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}");
+ chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Mixedbread.FileSearchResultRule? fileSearchResult = default;
if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.FileSearchResult)
{
- fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}");
+ fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var __value = new global::Mixedbread.DeletedRule2(
@@ -59,23 +70,32 @@ public override void Write(
global::Mixedbread.DeletedRule2 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsQueryString)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo);
}
else if (value.IsQueryRegex)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo);
}
else if (value.IsChunkSearchResult)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo);
}
else if (value.IsFileSearchResult)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo);
}
}
}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.EmbeddingItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.EmbeddingItem.g.cs
index 7197241..84b2845 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.EmbeddingItem.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.EmbeddingItem.g.cs
@@ -12,7 +12,8 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -27,8 +28,38 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization
}
var __score0 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score0++;
+ }
+ }
+ }
var __score1 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score1++;
+ }
+ }
+ }
var __score2 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(string), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score2++;
+ }
+ }
+ }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -45,7 +76,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization
try
{
- embeddingItemVariant1 = global::System.Text.Json.JsonSerializer.Deserialize>(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}");
+ embeddingItemVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -60,7 +93,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization
try
{
- embeddingItemVariant2 = global::System.Text.Json.JsonSerializer.Deserialize>(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}");
+ embeddingItemVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -75,7 +110,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization
try
{
- embeddingItemVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
+ embeddingItemVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -91,7 +128,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization
try
{
- embeddingItemVariant1 = global::System.Text.Json.JsonSerializer.Deserialize>(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}");
+ embeddingItemVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -103,7 +142,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization
try
{
- embeddingItemVariant2 = global::System.Text.Json.JsonSerializer.Deserialize>(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList