Skip to content

fix: clarify --param flag description with key=value format example#2068

Closed
chengyixu wants to merge 1 commit intoasyncapi:masterfrom
chengyixu:fix/1977-param-flag-description
Closed

fix: clarify --param flag description with key=value format example#2068
chengyixu wants to merge 1 commit intoasyncapi:masterfrom
chengyixu:fix/1977-param-flag-description

Conversation

@chengyixu
Copy link

Summary

Fixes #1977

The --param / -p flag description in the generate fromTemplate command was vague (Additional param to pass to templates), offering no hint about the required format. Users had to fail first (trigger the error It must be in the format of --param name1=value1) to discover the correct syntax.

Changes

Updated the flag description in src/apps/cli/internal/flags/generate/sharedFlags.ts to include an inline example:

Before:

Additional param to pass to templates

After:

Additional param to pass to templates (e.g., --param sidebarOrganization=byTags)

Why

  • Self-documenting help text reduces user friction
  • Consistent with the existing error message format
  • Zero functional change — only the description string is updated

Closes asyncapi#1977

The --param flag description was vague, causing users to fail before
discovering the required key=value format from the error message.
Updated to include an example format in the help text so users succeed
on their first try without needing to trigger an error first.
@changeset-bot
Copy link

changeset-bot bot commented Mar 21, 2026

🦋 Changeset detected

Latest commit: 88e2455

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sonarqubecloud
Copy link

@chengyixu
Copy link
Author

Hi @asyncapi/cli-maintainers! All CI checks are passing for this PR. Happy to make any adjustments needed for merge. Thanks!

@github-project-automation github-project-automation bot moved this from To Triage to Done in CLI - Kanban Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] Clarify usage format for --param flag in help command

2 participants