From a08c60bd7be93027664afe735d01d17566b903eb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 15 Aug 2024 15:15:47 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...i.AccountSetUsernameV1MeUsernamePatch.g.cs | 3 +- ...nfraApi.AccountUpdateDetailsV1MePatch.g.cs | 3 +- ...nfraApi.CreateApiTokenV1ApiTokensPost.g.cs | 3 +- ...tApplyPaymentDeepstartApplicationPost.g.cs | 3 +- ...epInfraApi.DeployCreateHfDeployHfPost.g.cs | 3 +- ...InfraApi.DeployCreateLlmDeployLlmPost.g.cs | 3 +- ...DeepInfraApi.DeployCreateV1DeployPost.g.cs | 3 +- ...nfraApi.DeployUpdateDeployDeployIdPut.g.cs | 3 +- ...odelMetaUpdateModelsModelNameMetaPost.g.cs | 3 +- ...PublicityModelsModelNamePublicityPost.g.cs | 3 +- ...naiAudioSpeechV1OpenaiAudioSpeechPost.g.cs | 3 +- ...ompletionsV1OpenaiChatCompletionsPost.g.cs | 3 +- ...naiCompletionsV1OpenaiCompletionsPost.g.cs | 3 +- ...penaiEmbeddingsV1OpenaiEmbeddingsPost.g.cs | 3 +- ...LimitIncreaseV1MeRateLimitRequestPost.g.cs | 3 +- ...epInfraApi.SetConfigPaymentConfigPost.g.cs | 3 +- ...InfraApi.SubmitFeedbackV1FeedbackPost.g.cs | 3 +- ...V1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs | 3 +- ...ceV1ElevenlabsV1VoicesVoiceIdEditPost.g.cs | 3 +- .../Generated/JsonConverters.AllOf1.g.cs | 11 ++----- .../Generated/JsonConverters.AnyOf2.g.cs | 14 ++------- .../Generated/JsonConverters.AnyOf4.g.cs | 20 ++----------- .../Generated/JsonConverters.AnyOf7.g.cs | 29 ++----------------- 23 files changed, 46 insertions(+), 85 deletions(-) diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsernameV1MeUsernamePatch.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsernameV1MeUsernamePatch.g.cs index ac69d42..7e55ebe 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsernameV1MeUsernamePatch.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsernameV1MeUsernamePatch.g.cs @@ -42,8 +42,9 @@ partial void ProcessAccountSetUsernameV1MeUsernamePatchResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/me/username", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.MeUsername); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.MeUsername), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountUpdateDetailsV1MePatch.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountUpdateDetailsV1MePatch.g.cs index b5d2908..979d425 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountUpdateDetailsV1MePatch.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountUpdateDetailsV1MePatch.g.cs @@ -42,8 +42,9 @@ partial void ProcessAccountUpdateDetailsV1MePatchResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/me", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.MeIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.MeIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateApiTokenV1ApiTokensPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateApiTokenV1ApiTokensPost.g.cs index 86198e9..4e037c9 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateApiTokenV1ApiTokensPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateApiTokenV1ApiTokensPost.g.cs @@ -42,8 +42,9 @@ partial void ProcessCreateApiTokenV1ApiTokensPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/api-tokens", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ApiTokenIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ApiTokenIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeepstartApplyPaymentDeepstartApplicationPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeepstartApplyPaymentDeepstartApplicationPost.g.cs index 697716c..0ef0310 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeepstartApplyPaymentDeepstartApplicationPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeepstartApplyPaymentDeepstartApplicationPost.g.cs @@ -47,8 +47,9 @@ partial void ProcessDeepstartApplyPaymentDeepstartApplicationPostResponseContent using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/payment/deepstart/application", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.DeepStartApplicationIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.DeepStartApplicationIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateHfDeployHfPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateHfDeployHfPost.g.cs index addd63f..6607555 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateHfDeployHfPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateHfDeployHfPost.g.cs @@ -42,8 +42,9 @@ partial void ProcessDeployCreateHfDeployHfPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/deploy/hf/", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.HFModel); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.HFModel), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateLlmDeployLlmPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateLlmDeployLlmPost.g.cs index bff0755..740bfcd 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateLlmDeployLlmPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateLlmDeployLlmPost.g.cs @@ -42,8 +42,9 @@ partial void ProcessDeployCreateLlmDeployLlmPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/deploy/llm", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.DeployLLMIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.DeployLLMIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateV1DeployPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateV1DeployPost.g.cs index b213a2d..b14a848 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateV1DeployPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateV1DeployPost.g.cs @@ -42,8 +42,9 @@ partial void ProcessDeployCreateV1DeployPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/deploy", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.DeployModelIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.DeployModelIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployUpdateDeployDeployIdPut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployUpdateDeployDeployIdPut.g.cs index 2eee5c3..ae0b0cd 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployUpdateDeployDeployIdPut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployUpdateDeployDeployIdPut.g.cs @@ -47,8 +47,9 @@ partial void ProcessDeployUpdateDeployDeployIdPutResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/deploy/{deployId}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.DeployLLMUpdateIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.DeployLLMUpdateIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelMetaUpdateModelsModelNameMetaPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelMetaUpdateModelsModelNameMetaPost.g.cs index 6703395..bf87203 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelMetaUpdateModelsModelNameMetaPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelMetaUpdateModelsModelNameMetaPost.g.cs @@ -47,8 +47,9 @@ partial void ProcessModelMetaUpdateModelsModelNameMetaPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/models/{modelName}/meta", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ModelMetaIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ModelMetaIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelPublicityModelsModelNamePublicityPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelPublicityModelsModelNamePublicityPost.g.cs index 6c6aeb7..d7fc03b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelPublicityModelsModelNamePublicityPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelPublicityModelsModelNamePublicityPost.g.cs @@ -47,8 +47,9 @@ partial void ProcessModelPublicityModelsModelNamePublicityPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/models/{modelName}/publicity", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ModelPublicityIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ModelPublicityIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs index e3c0180..2602aef 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs @@ -47,8 +47,9 @@ partial void ProcessOpenaiAudioSpeechV1OpenaiAudioSpeechPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/openai/audio/speech", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.OpenAITextToSpeechIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.OpenAITextToSpeechIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiChatCompletionsV1OpenaiChatCompletionsPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiChatCompletionsV1OpenaiChatCompletionsPost.g.cs index b119ccb..1c62bb0 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiChatCompletionsV1OpenaiChatCompletionsPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiChatCompletionsV1OpenaiChatCompletionsPost.g.cs @@ -52,8 +52,9 @@ partial void ProcessOpenaiChatCompletionsV1OpenaiChatCompletionsPostResponseCont using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/openai/chat/completions", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.OpenAIChatCompletionsIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.OpenAIChatCompletionsIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiCompletionsV1OpenaiCompletionsPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiCompletionsV1OpenaiCompletionsPost.g.cs index bdfda15..ddb15f2 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiCompletionsV1OpenaiCompletionsPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiCompletionsV1OpenaiCompletionsPost.g.cs @@ -52,8 +52,9 @@ partial void ProcessOpenaiCompletionsV1OpenaiCompletionsPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/openai/completions", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.OpenAICompletionsIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.OpenAICompletionsIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiEmbeddingsV1OpenaiEmbeddingsPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiEmbeddingsV1OpenaiEmbeddingsPost.g.cs index ab3df12..80df7b9 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiEmbeddingsV1OpenaiEmbeddingsPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiEmbeddingsV1OpenaiEmbeddingsPost.g.cs @@ -52,8 +52,9 @@ partial void ProcessOpenaiEmbeddingsV1OpenaiEmbeddingsPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/openai/embeddings", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.OpenAIEmbeddingsIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.OpenAIEmbeddingsIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.RequestRateLimitIncreaseV1MeRateLimitRequestPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.RequestRateLimitIncreaseV1MeRateLimitRequestPost.g.cs index 3d3f039..8e88bf2 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.RequestRateLimitIncreaseV1MeRateLimitRequestPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.RequestRateLimitIncreaseV1MeRateLimitRequestPost.g.cs @@ -42,8 +42,9 @@ partial void ProcessRequestRateLimitIncreaseV1MeRateLimitRequestPostResponseCont using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/me/rate_limit/request", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.RateLimitRequestIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.RateLimitRequestIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SetConfigPaymentConfigPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SetConfigPaymentConfigPost.g.cs index 578c79c..4ffc610 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SetConfigPaymentConfigPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SetConfigPaymentConfigPost.g.cs @@ -47,8 +47,9 @@ partial void ProcessSetConfigPaymentConfigPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/payment/config", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ConfigIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ConfigIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SubmitFeedbackV1FeedbackPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SubmitFeedbackV1FeedbackPost.g.cs index a89e221..7cbac3d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SubmitFeedbackV1FeedbackPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SubmitFeedbackV1FeedbackPost.g.cs @@ -43,8 +43,9 @@ partial void ProcessSubmitFeedbackV1FeedbackPostResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/feedback", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.FeedbackIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.FeedbackIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs index 11ea547..49f9f69 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs @@ -52,8 +52,9 @@ partial void ProcessTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponseCon using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/elevenlabs/v1/text-to-speech/{voiceId}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ElevenLabsTextToSpeechIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ElevenLabsTextToSpeechIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPost.g.cs index db47444..df89d8d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPost.g.cs @@ -47,8 +47,9 @@ partial void ProcessUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostResponseConten using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/elevenlabs/v1/voices/{voiceId}/edit", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.UpdateVoiceIn); var __httpRequestContent = new global::System.Net.Http.StringContent( - content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.UpdateVoiceIn), + content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); httpRequest.Content = __httpRequestContent; diff --git a/src/libs/DeepInfra/Generated/JsonConverters.AllOf1.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.AllOf1.g.cs index 82ab708..a1e4622 100644 --- a/src/libs/DeepInfra/Generated/JsonConverters.AllOf1.g.cs +++ b/src/libs/DeepInfra/Generated/JsonConverters.AllOf1.g.cs @@ -26,13 +26,10 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization.Jso catch (global::System.Text.Json.JsonException) { } + var result = new global::System.AllOf( value1 ); - if (!result.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid JSON format for AllOf<{typeof(T1).Name}>"); - } if (value1 != null) { @@ -40,6 +37,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization.Jso throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + return result; } @@ -52,11 +50,6 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (!value.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid AllOf<{typeof(T1).Name}> object."); - } - if (value.IsValue1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? diff --git a/src/libs/DeepInfra/Generated/JsonConverters.AnyOf2.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.AnyOf2.g.cs index e97e327..4514e48 100644 --- a/src/libs/DeepInfra/Generated/JsonConverters.AnyOf2.g.cs +++ b/src/libs/DeepInfra/Generated/JsonConverters.AnyOf2.g.cs @@ -38,15 +38,11 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization catch (global::System.Text.Json.JsonException) { } + var result = new global::System.AnyOf( value1, - value2 ); - if (!result.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid JSON format for AnyOf<{typeof(T1).Name}, {typeof(T2).Name}>"); - } if (value1 != null) { @@ -54,13 +50,13 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) { 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.Deserialize(ref reader, typeInfo); } + return result; } @@ -73,18 +69,12 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (!value.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid AnyOf<{typeof(T1).Name}, {typeof(T2).Name}> object."); - } - if (value.IsValue1) { 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) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? diff --git a/src/libs/DeepInfra/Generated/JsonConverters.AnyOf4.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.AnyOf4.g.cs index f7c3869..d953409 100644 --- a/src/libs/DeepInfra/Generated/JsonConverters.AnyOf4.g.cs +++ b/src/libs/DeepInfra/Generated/JsonConverters.AnyOf4.g.cs @@ -62,19 +62,13 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria catch (global::System.Text.Json.JsonException) { } + var result = new global::System.AnyOf( value1, - value2, - value3, - value4 ); - if (!result.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid JSON format for AnyOf<{typeof(T1).Name}, {typeof(T2).Name}, {typeof(T3).Name}, {typeof(T4).Name}>"); - } if (value1 != null) { @@ -82,27 +76,25 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) { 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.Deserialize(ref reader, typeInfo); } - else if (value3 != null) { 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.Deserialize(ref reader, typeInfo); } - else if (value4 != null) { 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.Deserialize(ref reader, typeInfo); } + return result; } @@ -115,32 +107,24 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (!value.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid AnyOf<{typeof(T1).Name}, {typeof(T2).Name}, {typeof(T3).Name}, {typeof(T4).Name}> object."); - } - if (value.IsValue1) { 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) { 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) { 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) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? diff --git a/src/libs/DeepInfra/Generated/JsonConverters.AnyOf7.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.AnyOf7.g.cs index ee2a9a8..97c9be9 100644 --- a/src/libs/DeepInfra/Generated/JsonConverters.AnyOf7.g.cs +++ b/src/libs/DeepInfra/Generated/JsonConverters.AnyOf7.g.cs @@ -98,25 +98,16 @@ public class AnyOfJsonConverter : global::System.Tex catch (global::System.Text.Json.JsonException) { } + var result = new global::System.AnyOf( value1, - value2, - value3, - value4, - value5, - value6, - value7 ); - if (!result.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid JSON format for AnyOf<{typeof(T1).Name}, {typeof(T2).Name}, {typeof(T3).Name}, {typeof(T4).Name}, {typeof(T5).Name}, {typeof(T6).Name}, {typeof(T7).Name}>"); - } if (value1 != null) { @@ -124,48 +115,43 @@ public class AnyOfJsonConverter : global::System.Tex throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) { 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.Deserialize(ref reader, typeInfo); } - else if (value3 != null) { 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.Deserialize(ref reader, typeInfo); } - else if (value4 != null) { 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.Deserialize(ref reader, typeInfo); } - else if (value5 != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value6 != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value7 != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T7).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + return result; } @@ -178,53 +164,42 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (!value.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid AnyOf<{typeof(T1).Name}, {typeof(T2).Name}, {typeof(T3).Name}, {typeof(T4).Name}, {typeof(T5).Name}, {typeof(T6).Name}, {typeof(T7).Name}> object."); - } - if (value.IsValue1) { 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) { 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) { 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) { 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); } - else if (value.IsValue5) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); } - else if (value.IsValue6) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6, typeInfo); } - else if (value.IsValue7) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??