From 65f8687350417f8d4d034df1457db5cfd3a09ba3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 14 Sep 2024 18:23:34 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...gram.GenerateClient.PostGenerateImage.g.cs | 4 ++-- ...deogram.GenerateClient.PostRemixImage.g.cs | 2 +- ...ogram.GenerateClient.PostUpscaleImage.g.cs | 2 +- .../Generated/Ideogram.GenerateClient.g.cs | 8 +++++-- .../Generated/Ideogram.IdeogramApi.g.cs | 23 +++++++++++++++---- .../Ideogram.ManageClient.CreateApiKey.g.cs | 2 +- .../Ideogram.ManageClient.GetApiKeys.g.cs | 2 +- ...ManageClient.GetApiStripeSubscription.g.cs | 2 +- ...ogram.ManageClient.GetApiSubscription.g.cs | 2 +- .../Ideogram.ManageClient.GetApiTerms.g.cs | 2 +- ...gram.ManageClient.PostApiSubscription.g.cs | 4 ++-- .../Ideogram.ManageClient.PostApiTerms.g.cs | 2 +- ...m.ManageClient.ReactivateSubscription.g.cs | 2 +- .../Generated/Ideogram.ManageClient.g.cs | 8 +++++-- .../Ideogram.VisionClient.PostDescribe.g.cs | 2 +- .../Generated/Ideogram.VisionClient.g.cs | 8 +++++-- 16 files changed, 50 insertions(+), 25 deletions(-) diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImage.g.cs index fd32210..7d64574 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImage.g.cs @@ -43,7 +43,7 @@ partial void ProcessPostGenerateImageResponseContent( 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('/') + "/generate", global::System.UriKind.RelativeOrAbsolute)); - var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ideogram.SourceGenerationContext.Default.GenerateImageRequest); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -91,7 +91,7 @@ partial void ProcessPostGenerateImageResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GenerateImageResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GenerateImageResponse), JsonSerializerContext) as global::Ideogram.GenerateImageResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImage.g.cs index c04bb70..b411c2f 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImage.g.cs @@ -102,7 +102,7 @@ partial void ProcessPostRemixImageResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GenerateImageResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GenerateImageResponse), JsonSerializerContext) as global::Ideogram.GenerateImageResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostUpscaleImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostUpscaleImage.g.cs index c6b97ec..f0b290e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostUpscaleImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostUpscaleImage.g.cs @@ -101,7 +101,7 @@ partial void ProcessPostUpscaleImageResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GenerateImageResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GenerateImageResponse), JsonSerializerContext) as global::Ideogram.GenerateImageResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.g.cs index 2d814b1..0f74c48 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.g.cs @@ -17,6 +17,11 @@ public sealed partial class GenerateClient : global::System.IDisposable private readonly global::System.Net.Http.HttpClient _httpClient; + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ideogram.SourceGenerationContext.Default; + /// /// Creates a new instance of the GenerateClient. @@ -27,8 +32,7 @@ public sealed partial class GenerateClient : global::System.IDisposable /// public GenerateClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null - ) + global::System.Uri? baseUri = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); diff --git a/src/libs/Ideogram/Generated/Ideogram.IdeogramApi.g.cs b/src/libs/Ideogram/Generated/Ideogram.IdeogramApi.g.cs index ea6adf7..e9272a2 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IdeogramApi.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IdeogramApi.g.cs @@ -17,21 +17,35 @@ public sealed partial class IdeogramApi : global::System.IDisposable private readonly global::System.Net.Http.HttpClient _httpClient; + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ideogram.SourceGenerationContext.Default; + /// /// All things related to generating content. /// - public GenerateClient Generate => new GenerateClient(_httpClient); + public GenerateClient Generate => new GenerateClient(_httpClient) + { + JsonSerializerContext = JsonSerializerContext, + }; /// /// Content related to managing API account and API access /// - public ManageClient Manage => new ManageClient(_httpClient); + public ManageClient Manage => new ManageClient(_httpClient) + { + JsonSerializerContext = JsonSerializerContext, + }; /// /// Operations related to understanding visual content /// - public VisionClient Vision => new VisionClient(_httpClient); + public VisionClient Vision => new VisionClient(_httpClient) + { + JsonSerializerContext = JsonSerializerContext, + }; /// /// Creates a new instance of the IdeogramApi. @@ -42,8 +56,7 @@ public sealed partial class IdeogramApi : global::System.IDisposable /// public IdeogramApi( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null - ) + global::System.Uri? baseUri = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.CreateApiKey.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.CreateApiKey.g.cs index 30cfc38..db1017e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.CreateApiKey.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.CreateApiKey.g.cs @@ -76,7 +76,7 @@ partial void ProcessCreateApiKeyResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.PostApiKeyResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.PostApiKeyResponse), JsonSerializerContext) as global::Ideogram.PostApiKeyResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } } diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeys.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeys.g.cs index da58adf..93cd9c5 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeys.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeys.g.cs @@ -76,7 +76,7 @@ partial void ProcessGetApiKeysResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GetApiKeysResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GetApiKeysResponse), JsonSerializerContext) as global::Ideogram.GetApiKeysResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } } diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiStripeSubscription.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiStripeSubscription.g.cs index 6aba392..f61c2d1 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiStripeSubscription.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiStripeSubscription.g.cs @@ -82,7 +82,7 @@ partial void ProcessGetApiStripeSubscriptionResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.ManageApiStripeSubscriptionResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.ManageApiStripeSubscriptionResponse), JsonSerializerContext) as global::Ideogram.ManageApiStripeSubscriptionResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } } diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiSubscription.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiSubscription.g.cs index e441287..b55a89b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiSubscription.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiSubscription.g.cs @@ -76,7 +76,7 @@ partial void ProcessGetApiSubscriptionResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.ManageApiSubscriptionResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.ManageApiSubscriptionResponse), JsonSerializerContext) as global::Ideogram.ManageApiSubscriptionResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } } diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiTerms.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiTerms.g.cs index 245ff83..3fabdcd 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiTerms.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiTerms.g.cs @@ -76,7 +76,7 @@ partial void ProcessGetApiTermsResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GetApiTermsResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GetApiTermsResponse), JsonSerializerContext) as global::Ideogram.GetApiTermsResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } } diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiSubscription.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiSubscription.g.cs index 0d21465..4e28283 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiSubscription.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiSubscription.g.cs @@ -42,7 +42,7 @@ partial void ProcessPostApiSubscriptionResponseContent( 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('/') + "/manage/api/subscription", global::System.UriKind.RelativeOrAbsolute)); - var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ideogram.SourceGenerationContext.Default.PostApiSubscriptionRequest); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -90,7 +90,7 @@ partial void ProcessPostApiSubscriptionResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.PostApiSubscriptionResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.PostApiSubscriptionResponse), JsonSerializerContext) as global::Ideogram.PostApiSubscriptionResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiTerms.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiTerms.g.cs index 3362e76..223d75e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiTerms.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiTerms.g.cs @@ -37,7 +37,7 @@ partial void ProcessPostApiTermsResponse( 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('/') + "/manage/api/terms", global::System.UriKind.RelativeOrAbsolute)); - var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ideogram.SourceGenerationContext.Default.PostApiTermsRequest); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.ReactivateSubscription.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.ReactivateSubscription.g.cs index b86d596..a1d0143 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.ReactivateSubscription.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.ReactivateSubscription.g.cs @@ -76,7 +76,7 @@ partial void ProcessReactivateSubscriptionResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.PostApiReactivateResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.PostApiReactivateResponse), JsonSerializerContext) as global::Ideogram.PostApiReactivateResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } } diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.g.cs index 7bfc6bf..dd20e47 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.g.cs @@ -17,6 +17,11 @@ public sealed partial class ManageClient : global::System.IDisposable private readonly global::System.Net.Http.HttpClient _httpClient; + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ideogram.SourceGenerationContext.Default; + /// /// Creates a new instance of the ManageClient. @@ -27,8 +32,7 @@ public sealed partial class ManageClient : global::System.IDisposable /// public ManageClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null - ) + global::System.Uri? baseUri = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); diff --git a/src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs b/src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs index 40251bc..cfd368e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs @@ -99,7 +99,7 @@ partial void ProcessPostDescribeResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.DescribeResponse) ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.DescribeResponse), JsonSerializerContext) as global::Ideogram.DescribeResponse ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } diff --git a/src/libs/Ideogram/Generated/Ideogram.VisionClient.g.cs b/src/libs/Ideogram/Generated/Ideogram.VisionClient.g.cs index 11423b6..63bf2a7 100644 --- a/src/libs/Ideogram/Generated/Ideogram.VisionClient.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.VisionClient.g.cs @@ -17,6 +17,11 @@ public sealed partial class VisionClient : global::System.IDisposable private readonly global::System.Net.Http.HttpClient _httpClient; + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ideogram.SourceGenerationContext.Default; + /// /// Creates a new instance of the VisionClient. @@ -27,8 +32,7 @@ public sealed partial class VisionClient : global::System.IDisposable /// public VisionClient( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null - ) + global::System.Uri? baseUri = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);