From 498f9ddca5eb2c59cb63a202cfea04295000b0e0 Mon Sep 17 00:00:00 2001 From: Gabriel Dugny Date: Tue, 13 Jan 2026 18:12:04 +0100 Subject: [PATCH] fix(repo-tools): Invalid --help for backstage-repo-tools package schema openapi generate (#32305) Signed-off-by: Gabriel Dugny --- .changeset/slow-bobcats-lose.md | 5 +++++ packages/repo-tools/cli-report.md | 4 ++++ packages/repo-tools/src/commands/index.ts | 22 ++++++++++++---------- 3 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 .changeset/slow-bobcats-lose.md diff --git a/.changeset/slow-bobcats-lose.md b/.changeset/slow-bobcats-lose.md new file mode 100644 index 0000000000..d837bc32cf --- /dev/null +++ b/.changeset/slow-bobcats-lose.md @@ -0,0 +1,5 @@ +--- +'@backstage/repo-tools': patch +--- + +Fixed help text for `backstage-repo-tools package schema openapi generate` command. diff --git a/packages/repo-tools/cli-report.md b/packages/repo-tools/cli-report.md index acde92d742..6b6f2ae710 100644 --- a/packages/repo-tools/cli-report.md +++ b/packages/repo-tools/cli-report.md @@ -160,7 +160,11 @@ Options: Usage: backstage-repo-tools package schema openapi generate [options] Options: + --client-additional-properties [properties] --client-package [package] + --server + --server-additional-properties [properties] + --watch -h, --help ``` diff --git a/packages/repo-tools/src/commands/index.ts b/packages/repo-tools/src/commands/index.ts index 01288056c7..dab7d6df0d 100644 --- a/packages/repo-tools/src/commands/index.ts +++ b/packages/repo-tools/src/commands/index.ts @@ -44,24 +44,26 @@ function registerPackageCommand(program: Command) { openApiCommand .command('generate') + .description( + 'Command to generate a client and/or a server stub from an OpenAPI spec.', + ) .option( '--client-package [package]', 'Top-level path to where the client should be generated, ie packages/catalog-client.', ) - .option('--server') - .description( - 'Command to generate a client and/or a server stub from an OpenAPI spec.', - ) - .option('--client-additional-properties [properties]') - .description( + .option('--server', 'Generate server stub') + .option( + '--client-additional-properties [properties]', 'Additional properties that can be passed to @openapitools/openapi-generator-cli', ) - .option('--server-additional-properties [properties]') - .description( + .option( + '--server-additional-properties [properties]', 'Additional properties that can be passed to @openapitools/openapi-generator-cli', ) - .option('--watch') - .description('Watch the OpenAPI spec for changes and regenerate on save.') + .option( + '--watch', + 'Watch the OpenAPI spec for changes and regenerate on save.', + ) .action(lazy(() => import('./package/schema/openapi/generate'), 'command')); openApiCommand