Skip to content

Commit 6287929

Browse files
authored
docs(cli): update latest cli documentation (#4510)
1 parent e398ae7 commit 6287929

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

markdown/docs/tools/cli/usage.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ USAGE
4242
* [`asyncapi bundle`](#asyncapi-bundle)
4343
* [`asyncapi config`](#asyncapi-config)
4444
* [`asyncapi config analytics`](#asyncapi-config-analytics)
45+
* [`asyncapi config auth add PATTERN TOKEN`](#asyncapi-config-auth-add-pattern-token)
4546
* [`asyncapi config context`](#asyncapi-config-context)
4647
* [`asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH`](#asyncapi-config-context-add-context-name-spec-file-path)
4748
* [`asyncapi config context current`](#asyncapi-config-context-current)
@@ -170,6 +171,37 @@ DESCRIPTION
170171

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

174+
## `asyncapi config auth add PATTERN TOKEN`
175+
176+
Add an authentication config for resolving $ref files requiring HTTP Authorization.
177+
178+
```
179+
USAGE
180+
$ asyncapi config auth add PATTERN TOKEN [-a <value>] [-h <value>...]
181+
182+
ARGUMENTS
183+
PATTERN Glob pattern for matching protected URLs (e.g. github.com/org/repo/**/*.*)
184+
TOKEN Authentication token or environment variable reference (prefix with $, e.g. $GITHUB_TOKEN)
185+
186+
FLAGS
187+
-a, --auth-type=<value> Authentication type (default is "Bearer")
188+
-h, --header=<value>... Additional headers in key=value format
189+
190+
DESCRIPTION
191+
Add an authentication config for resolving $ref files requiring HTTP Authorization.
192+
193+
EXAMPLES
194+
$ asyncapi config auth add "https://github.com/org/repo/**/*" "ghp_XuYi7ZWQWjmrJpY2Kz3ET"
195+
196+
$ asyncapi config auth add "https://api.github.com/repos/org/repo/**/*" "$GITHUB_TOKEN"
197+
198+
$ asyncapi config auth add "https://private-registry.com/**/*" "my-token" --auth-type="Token"
199+
200+
$ asyncapi config auth add "https://api.example.com/**/*" "token123" --header="X-API-Key=abc123" --header="User-Agent=MyApp/1.0"
201+
```
202+
203+
_See code: [src/commands/config/auth/add.ts](https://github.com/asyncapi/cli/blob/v3.2.0/src/commands/config/auth/add.ts)_
204+
173205
## `asyncapi config context`
174206

175207
Manage short aliases for full paths to AsyncAPI documents

0 commit comments

Comments
 (0)