From fb8a49ef168b2b6a54b3ad52494556723aa53415 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 28 Sep 2026 18:56:47 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- src/cli/ImagineArt.CLI/Commands/ApiCommand.g.cs | 5 ++++- .../Commands/ImageEditingApiGroupCommand.g.cs | 5 ++++- ...ImageEditingRemoveBackgroundCommandApiCommand.g.cs | 3 +++ .../ImageEditingUpscaleImageCommandApiCommand.g.cs | 3 +++ .../Commands/ImageGenerationApiGroupCommand.g.cs | 5 ++++- ...ImageGenerationGenerateImageCommandApiCommand.g.cs | 3 +++ ...tionGenerateTransparentImageCommandApiCommand.g.cs | 3 +++ src/cli/ImagineArt.CLI/README.md | 11 +++++++++-- 8 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/cli/ImagineArt.CLI/Commands/ApiCommand.g.cs b/src/cli/ImagineArt.CLI/Commands/ApiCommand.g.cs index ac0e927..0782ddf 100644 --- a/src/cli/ImagineArt.CLI/Commands/ApiCommand.g.cs +++ b/src/cli/ImagineArt.CLI/Commands/ApiCommand.g.cs @@ -4,14 +4,17 @@ namespace ImagineArt.CLI.Commands; -internal static class ApiCommand +internal static partial class ApiCommand { + static partial void CustomizeCommand(ref Command command); + public static Command Create() { var command = new Command("api", "Generated endpoint commands."); command.Subcommands.Add(ImageEditingApiGroupCommand.Create()); command.Subcommands.Add(ImageGenerationApiGroupCommand.Create()); + CustomizeCommand(ref command); return command; } } \ No newline at end of file diff --git a/src/cli/ImagineArt.CLI/Commands/ImageEditingApiGroupCommand.g.cs b/src/cli/ImagineArt.CLI/Commands/ImageEditingApiGroupCommand.g.cs index 0fe9677..311056b 100644 --- a/src/cli/ImagineArt.CLI/Commands/ImageEditingApiGroupCommand.g.cs +++ b/src/cli/ImagineArt.CLI/Commands/ImageEditingApiGroupCommand.g.cs @@ -4,13 +4,16 @@ namespace ImagineArt.CLI.Commands; -internal static class ImageEditingApiGroupCommand +internal static partial class ImageEditingApiGroupCommand { + static partial void CustomizeCommand(ref Command command); + public static Command Create() { var command = new Command(@"image-editing", @"ImageEditing endpoint commands."); command.Subcommands.Add(ImageEditingRemoveBackgroundCommandApiCommand.Create()); command.Subcommands.Add(ImageEditingUpscaleImageCommandApiCommand.Create()); + CustomizeCommand(ref command); return command; } } \ No newline at end of file diff --git a/src/cli/ImagineArt.CLI/Commands/ImageEditingRemoveBackgroundCommandApiCommand.g.cs b/src/cli/ImagineArt.CLI/Commands/ImageEditingRemoveBackgroundCommandApiCommand.g.cs index 7972bf4..ab26a99 100644 --- a/src/cli/ImagineArt.CLI/Commands/ImageEditingRemoveBackgroundCommandApiCommand.g.cs +++ b/src/cli/ImagineArt.CLI/Commands/ImageEditingRemoveBackgroundCommandApiCommand.g.cs @@ -15,6 +15,8 @@ internal static partial class ImageEditingRemoveBackgroundCommandApiCommand }; private static readonly ImageFileRequestOptionSet ImageFileRequestOptionSetOptions = ImageFileRequestOptionSet.Create(); + static partial void CustomizeCommand(ref Command command); + public static Command Create() { var command = new Command(@"remove-background", @"Background Remover API @@ -36,6 +38,7 @@ await CliRuntime.RunAsync(async () => await CliRuntime.WriteBinaryAsync(parseResult, response, cancellationToken).ConfigureAwait(false); }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); return command; } } \ No newline at end of file diff --git a/src/cli/ImagineArt.CLI/Commands/ImageEditingUpscaleImageCommandApiCommand.g.cs b/src/cli/ImagineArt.CLI/Commands/ImageEditingUpscaleImageCommandApiCommand.g.cs index 7f7b1e0..0adef26 100644 --- a/src/cli/ImagineArt.CLI/Commands/ImageEditingUpscaleImageCommandApiCommand.g.cs +++ b/src/cli/ImagineArt.CLI/Commands/ImageEditingUpscaleImageCommandApiCommand.g.cs @@ -15,6 +15,8 @@ internal static partial class ImageEditingUpscaleImageCommandApiCommand }; private static readonly ImageFileRequestOptionSet ImageFileRequestOptionSetOptions = ImageFileRequestOptionSet.Create(); + static partial void CustomizeCommand(ref Command command); + public static Command Create() { var command = new Command(@"upscale-image", @"Image Upscale API @@ -36,6 +38,7 @@ await CliRuntime.RunAsync(async () => await CliRuntime.WriteBinaryAsync(parseResult, response, cancellationToken).ConfigureAwait(false); }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); return command; } } \ No newline at end of file diff --git a/src/cli/ImagineArt.CLI/Commands/ImageGenerationApiGroupCommand.g.cs b/src/cli/ImagineArt.CLI/Commands/ImageGenerationApiGroupCommand.g.cs index 6bc5d4e..5f7fbd8 100644 --- a/src/cli/ImagineArt.CLI/Commands/ImageGenerationApiGroupCommand.g.cs +++ b/src/cli/ImagineArt.CLI/Commands/ImageGenerationApiGroupCommand.g.cs @@ -4,13 +4,16 @@ namespace ImagineArt.CLI.Commands; -internal static class ImageGenerationApiGroupCommand +internal static partial class ImageGenerationApiGroupCommand { + static partial void CustomizeCommand(ref Command command); + public static Command Create() { var command = new Command(@"image-generation", @"ImageGeneration endpoint commands."); command.Subcommands.Add(ImageGenerationGenerateImageCommandApiCommand.Create()); command.Subcommands.Add(ImageGenerationGenerateTransparentImageCommandApiCommand.Create()); + CustomizeCommand(ref command); return command; } } \ No newline at end of file diff --git a/src/cli/ImagineArt.CLI/Commands/ImageGenerationGenerateImageCommandApiCommand.g.cs b/src/cli/ImagineArt.CLI/Commands/ImageGenerationGenerateImageCommandApiCommand.g.cs index 81b2dd7..1d8c194 100644 --- a/src/cli/ImagineArt.CLI/Commands/ImageGenerationGenerateImageCommandApiCommand.g.cs +++ b/src/cli/ImagineArt.CLI/Commands/ImageGenerationGenerateImageCommandApiCommand.g.cs @@ -49,6 +49,8 @@ internal static partial class ImageGenerationGenerateImageCommandApiCommand Hidden = true, }; + static partial void CustomizeCommand(ref Command command); + public static Command Create() { var command = new Command(@"generate-image", @"Text to Image API @@ -98,6 +100,7 @@ await CliRuntime.RunAsync(async () => await CliRuntime.WriteBinaryAsync(parseResult, response, cancellationToken).ConfigureAwait(false); }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); return command; } } \ No newline at end of file diff --git a/src/cli/ImagineArt.CLI/Commands/ImageGenerationGenerateTransparentImageCommandApiCommand.g.cs b/src/cli/ImagineArt.CLI/Commands/ImageGenerationGenerateTransparentImageCommandApiCommand.g.cs index 2b19bb6..598387f 100644 --- a/src/cli/ImagineArt.CLI/Commands/ImageGenerationGenerateTransparentImageCommandApiCommand.g.cs +++ b/src/cli/ImagineArt.CLI/Commands/ImageGenerationGenerateTransparentImageCommandApiCommand.g.cs @@ -42,6 +42,8 @@ internal static partial class ImageGenerationGenerateTransparentImageCommandApiC Hidden = true, }; + static partial void CustomizeCommand(ref Command command); + public static Command Create() { var command = new Command(@"generate-transparent-image", @"Text to PNG API @@ -88,6 +90,7 @@ await CliRuntime.RunAsync(async () => await CliRuntime.WriteBinaryAsync(parseResult, response, cancellationToken).ConfigureAwait(false); }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); return command; } } \ No newline at end of file diff --git a/src/cli/ImagineArt.CLI/README.md b/src/cli/ImagineArt.CLI/README.md index fb7e5f0..37fbb21 100644 --- a/src/cli/ImagineArt.CLI/README.md +++ b/src/cli/ImagineArt.CLI/README.md @@ -12,5 +12,12 @@ dotnet tool install --global ImagineArt.CLI --prerelease ```bash imagine-art --help -imagine-art api --help -``` \ No newline at end of file +imagine-art image-editing --help +``` + +## Customization + +Generated operation, tag, and API group command classes are partial. Implement +`static partial void CustomizeCommand(ref Command command)` in a separate source +file to add aliases or validators, change the action, or replace a command. The +hook runs after the generated command has been configured. \ No newline at end of file