Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions markdown/docs/tools/cli/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ USAGE
* [`asyncapi bundle`](#asyncapi-bundle)
* [`asyncapi config`](#asyncapi-config)
* [`asyncapi config analytics`](#asyncapi-config-analytics)
* [`asyncapi config auth add PATTERN TOKEN`](#asyncapi-config-auth-add-pattern-token)
* [`asyncapi config context`](#asyncapi-config-context)
* [`asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH`](#asyncapi-config-context-add-context-name-spec-file-path)
* [`asyncapi config context current`](#asyncapi-config-context-current)
Expand Down Expand Up @@ -170,6 +171,37 @@ DESCRIPTION

_See code: [src/commands/config/analytics.ts](https://github.com/asyncapi/cli/blob/v3.2.0/src/commands/config/analytics.ts)_

## `asyncapi config auth add PATTERN TOKEN`

Add an authentication config for resolving $ref files requiring HTTP Authorization.

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add language identifier to code fence for linting compliance.

The fenced code block lacks a language specification, triggering MD040. Align with the sh-session format used in the usage section (line 25).

 DESCRIPTION
   Add an authentication config for resolving $ref files requiring HTTP Authorization.
 
-```
+```sh
 USAGE
   $ asyncapi config auth add PATTERN TOKEN [-a <value>] [-h <value>...]
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

178-178: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In markdown/docs/tools/cli/usage.md around line 178, the fenced code block is
missing a language identifier which triggers MD040; update the opening fence
from ``` to ```sh so the block uses the same sh-session/language tag used
earlier (line 25) to satisfy linting and ensure consistent formatting.

USAGE
$ asyncapi config auth add PATTERN TOKEN [-a <value>] [-h <value>...]

ARGUMENTS
PATTERN Glob pattern for matching protected URLs (e.g. github.com/org/repo/**/*.*)
TOKEN Authentication token or environment variable reference (prefix with $, e.g. $GITHUB_TOKEN)

FLAGS
-a, --auth-type=<value> Authentication type (default is "Bearer")
-h, --header=<value>... Additional headers in key=value format

DESCRIPTION
Add an authentication config for resolving $ref files requiring HTTP Authorization.

EXAMPLES
$ asyncapi config auth add "https://github.com/org/repo/**/*" "ghp_XuYi7ZWQWjmrJpY2Kz3ET"

$ asyncapi config auth add "https://api.github.com/repos/org/repo/**/*" "$GITHUB_TOKEN"

$ asyncapi config auth add "https://private-registry.com/**/*" "my-token" --auth-type="Token"

$ asyncapi config auth add "https://api.example.com/**/*" "token123" --header="X-API-Key=abc123" --header="User-Agent=MyApp/1.0"
```

_See code: [src/commands/config/auth/add.ts](https://github.com/asyncapi/cli/blob/v3.2.0/src/commands/config/auth/add.ts)_

## `asyncapi config context`

Manage short aliases for full paths to AsyncAPI documents
Expand Down