The AsyncAPI CLI makes it easier to work with AsyncAPI documents.
Usage
1$ npm install -g @asyncapi/cli
2$ asyncapi COMMAND
3running command...
4$ asyncapi (--version)
5@asyncapi/cli/2.12.0 linux-x64 node-v18.20.5
6$ asyncapi --help [COMMAND]
7USAGE
8 $ asyncapi COMMAND
9...
Commands
asyncapi bundle
asyncapi config
asyncapi config analytics
asyncapi config context
asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH
asyncapi config context current
asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH
asyncapi config context init [CONTEXT-FILE-PATH]
asyncapi config context list
asyncapi config context remove CONTEXT-NAME
asyncapi config context use CONTEXT-NAME
asyncapi config versions
asyncapi convert [SPEC-FILE]
asyncapi diff OLD NEW
asyncapi format [SPEC-FILE]
asyncapi generate
asyncapi generate fromTemplate ASYNCAPI TEMPLATE
asyncapi generate models LANGUAGE FILE
asyncapi new
asyncapi new file
asyncapi new glee
asyncapi new template
asyncapi optimize [SPEC-FILE]
asyncapi pretty SPEC-FILE
asyncapi start
asyncapi start studio
asyncapi validate [SPEC-FILE]
asyncapi bundle
Bundle one or multiple AsyncAPI Documents and their references together.
1USAGE
2 $ asyncapi bundle [-h] [-o <value>] [-b <value>] [-d <value>] [-x]
3
4FLAGS
5 -b, --base=<value> Path to the file which will act as a base. This is required when some properties need to be
6 overwritten.
7 -d, --baseDir=<value> One relative/absolute path to directory relative to which paths to AsyncAPI Documents that
8 should be bundled will be resolved.
9 -h, --help Show CLI help.
10 -o, --output=<value> The output file name. Omitting this flag the result will be printed in the console.
11 -x, --xOrigin Pass this switch to generate properties "x-origin" that will contain historical values of
12 dereferenced "$ref"s.
13
14DESCRIPTION
15 Bundle one or multiple AsyncAPI Documents and their references together.
16
17EXAMPLES
18 $ asyncapi bundle ./asyncapi.yaml > final-asyncapi.yaml
19
20 $ asyncapi bundle ./asyncapi.yaml --output final-asyncapi.yaml
21
22 $ asyncapi bundle ./asyncapi.yaml ./features.yaml
23
24 $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./main.yaml
25
26 $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./main.yaml --xOrigin
27
28 $ asyncapi bundle ./asyncapi.yaml -o final-asyncapi.yaml --base ../public-api/main.yaml --baseDir ./social-media/comments-service
See code: src/commands/bundle.ts
asyncapi config
CLI config settings
1USAGE
2 $ asyncapi config
3
4DESCRIPTION
5 CLI config settings
See code: src/commands/config/index.ts
asyncapi config analytics
Enable or disable analytics for metrics collection
1USAGE
2 $ asyncapi config analytics [-h] [-d] [-e] [-s]
3
4FLAGS
5 -d, --disable disable analytics
6 -e, --enable enable analytics
7 -h, --help Show CLI help.
8 -s, --status show current status of analytics
9
10DESCRIPTION
11 Enable or disable analytics for metrics collection
See code: src/commands/config/analytics.ts
asyncapi config context
Manage short aliases for full paths to AsyncAPI documents
1USAGE
2 $ asyncapi config context
3
4DESCRIPTION
5 Manage short aliases for full paths to AsyncAPI documents
See code: src/commands/config/context/index.ts
asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH
Add a context to the store
1USAGE
2 $ asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH [-h] [-s]
3
4ARGUMENTS
5 CONTEXT-NAME context name
6 SPEC-FILE-PATH file path of the spec file
7
8FLAGS
9 -h, --help Show CLI help.
10 -s, --set-current Set context being added as the current context
11
12DESCRIPTION
13 Add a context to the store
See code: src/commands/config/context/add.ts
asyncapi config context current
Shows the current context that is being used
1USAGE
2 $ asyncapi config context current [-h]
3
4FLAGS
5 -h, --help Show CLI help.
6
7DESCRIPTION
8 Shows the current context that is being used
See code: src/commands/config/context/current.ts
asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH
Edit a context in the store
1USAGE
2 $ asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH [-h]
3
4ARGUMENTS
5 CONTEXT-NAME context name
6 NEW-SPEC-FILE-PATH file path of the spec file
7
8FLAGS
9 -h, --help Show CLI help.
10
11DESCRIPTION
12 Edit a context in the store
See code: src/commands/config/context/edit.ts
asyncapi config context init [CONTEXT-FILE-PATH]
Initialize context
1USAGE
2 $ asyncapi config context init [CONTEXT-FILE-PATH] [-h]
3
4ARGUMENTS
5 CONTEXT-FILE-PATH Specify directory in which context file should be created:
6 - current directory : asyncapi config context init . (default)
7 - root of current repository : asyncapi config context init ./
8 - user's home directory : asyncapi config context init ~
9
10FLAGS
11 -h, --help Show CLI help.
12
13DESCRIPTION
14 Initialize context
See code: src/commands/config/context/init.ts
asyncapi config context list
List all the stored contexts in the store
1USAGE
2 $ asyncapi config context list [-h]
3
4FLAGS
5 -h, --help Show CLI help.
6
7DESCRIPTION
8 List all the stored contexts in the store
See code: src/commands/config/context/list.ts
asyncapi config context remove CONTEXT-NAME
Delete a context from the store
1USAGE
2 $ asyncapi config context remove CONTEXT-NAME [-h]
3
4ARGUMENTS
5 CONTEXT-NAME Name of the context to delete
6
7FLAGS
8 -h, --help Show CLI help.
9
10DESCRIPTION
11 Delete a context from the store
See code: src/commands/config/context/remove.ts
asyncapi config context use CONTEXT-NAME
Set a context as current
1USAGE
2 $ asyncapi config context use CONTEXT-NAME [-h]
3
4ARGUMENTS
5 CONTEXT-NAME name of the saved context
6
7FLAGS
8 -h, --help Show CLI help.
9
10DESCRIPTION
11 Set a context as current
See code: src/commands/config/context/use.ts
asyncapi config versions
Show versions of AsyncAPI tools used
1USAGE
2 $ asyncapi config versions [-h]
3
4FLAGS
5 -h, --help Show CLI help.
6
7DESCRIPTION
8 Show versions of AsyncAPI tools used
See code: src/commands/config/versions.ts
asyncapi convert [SPEC-FILE]
Convert asyncapi documents older to newer versions or OpenAPI/postman-collection documents to AsyncAPI
1USAGE
2 $ asyncapi convert [SPEC-FILE] -f openapi|asyncapi|postman-collection [-h] [-o <value>] [-t <value>] [-p
3 client|server]
4
5ARGUMENTS
6 SPEC-FILE spec path, url, or context-name
7
8FLAGS
9 -f, --format=<option> (required) [default: asyncapi] Specify the format to convert from (openapi or asyncapi)
10 <options: openapi|asyncapi|postman-collection>
11 -h, --help Show CLI help.
12 -o, --output=<value> path to the file where the result is saved
13 -p, --perspective=<option> [default: server] Perspective to use when converting OpenAPI to AsyncAPI (client or
14 server). Note: This option is only applicable for OpenAPI to AsyncAPI conversions.
15 <options: client|server>
16 -t, --target-version=<value> [default: 3.0.0] asyncapi version to convert to
17
18DESCRIPTION
19 Convert asyncapi documents older to newer versions or OpenAPI/postman-collection documents to AsyncAPI
See code: src/commands/convert.ts
asyncapi diff OLD NEW
Find diff between two asyncapi files
1USAGE
2 $ asyncapi diff OLD NEW [-h] [-f json|yaml|yml|md] [-t breaking|non-breaking|unclassified|all]
3 [--markdownSubtype json|yaml|yml] [-o <value>] [--no-error] [-w] [--log-diagnostics] [--diagnostics-format
4 json|stylish|junit|html|text|teamcity|pretty] [--fail-severity error|warn|info|hint] [-o <value>]
5
6ARGUMENTS
7 OLD old spec path, URL or context-name
8 NEW new spec path, URL or context-name
9
10FLAGS
11 -f, --format=<option> [default: yaml] format of the output
12 <options: json|yaml|yml|md>
13 -h, --help Show CLI help.
14 -o, --output=<value> The output file name. Omitting this flag the result will be printed in the console.
15 -o, --overrides=<value> path to JSON file containing the override properties
16 -t, --type=<option> [default: all] type of the output
17 <options: breaking|non-breaking|unclassified|all>
18 -w, --watch Enable watch mode
19 --diagnostics-format=<option> [default: stylish] format to use for validation diagnostics
20 <options: json|stylish|junit|html|text|teamcity|pretty>
21 --fail-severity=<option> [default: error] diagnostics of this level or above will trigger a failure exit
22 code
23 <options: error|warn|info|hint>
24 --[no-]log-diagnostics log validation diagnostics or not
25 --markdownSubtype=<option> the format of changes made to AsyncAPI document. It works only when diff is
26 generated using md type. For example, when you specify subtype as json, then diff
27 information in markdown is dumped as json structure.
28 <options: json|yaml|yml>
29 --no-error don't show error on breaking changes
30
31DESCRIPTION
32 Find diff between two asyncapi files
See code: src/commands/diff.ts
asyncapi format [SPEC-FILE]
Convert asyncapi documents from any format to yaml, yml or JSON
1USAGE
2 $ asyncapi format [SPEC-FILE] -f yaml|yml|json [-h] [-o <value>]
3
4ARGUMENTS
5 SPEC-FILE spec path, url, or context-name
6
7FLAGS
8 -f, --format=<option> (required) [default: json] Specify the format to convert to
9 <options: yaml|yml|json>
10 -h, --help Show CLI help.
11 -o, --output=<value> path to the file where the result is saved
12
13DESCRIPTION
14 Convert asyncapi documents from any format to yaml, yml or JSON
See code: src/commands/format.ts
asyncapi generate
Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.
1USAGE
2 $ asyncapi generate
3
4DESCRIPTION
5 Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.
See code: src/commands/generate/index.ts
asyncapi generate fromTemplate ASYNCAPI TEMPLATE
Generates whatever you want using templates compatible with AsyncAPI Generator.
1USAGE
2 $ asyncapi generate fromTemplate ASYNCAPI TEMPLATE [-h] [-d <value>...] [--no-interactive] [-i] [--debug] [-n <value>...]
3 [-o <value>] [--force-write] [-w] [-p <value>...] [--map-base-url <value>] [--registry-url <value>] [--registry-auth
4 <value>] [--registry-token <value>] [--use-new-generator]
5
6ARGUMENTS
7 ASYNCAPI - Local path, url or context-name pointing to AsyncAPI file
8 TEMPLATE - Name of the generator template like for example @asyncapi/html-template or
9 https://github.com/asyncapi/html-template
10
11FLAGS
12 -d, --disable-hook=<value>... Disable a specific hook type or hooks from a given hook type
13 -h, --help Show CLI help.
14 -i, --install Installs the template and its dependencies (defaults to false)
15 -n, --no-overwrite=<value>... Glob or path of the file(s) to skip when regenerating
16 -o, --output=<value> Directory where to put the generated files (defaults to current directory)
17 -p, --param=<value>... Additional param to pass to templates
18 -w, --watch Watches the template directory and the AsyncAPI document, and re-generate the files
19 when changes occur. Ignores the output directory.
20 --debug Enable more specific errors in the console
21 --force-write Force writing of the generated files to given directory even if it is a git repo with
22 unstaged files or not empty dir (defaults to false)
23 --map-base-url=<value> Maps all schema references from base url to local folder
24 --no-interactive Disable interactive mode and run with the provided flags.
25 --registry-auth=<value> The registry username and password encoded with base64, formatted as username:password
26 --registry-token=<value> The npm registry authentication token, that can be passed instead of base64 encoded
27 username and password
28 --registry-url=<value> [default: https://registry.npmjs.org] Specifies the URL of the private registry for
29 fetching templates and dependencies
30 --use-new-generator Use v2 generator, for generating from newer templates
31
32DESCRIPTION
33 Generates whatever you want using templates compatible with AsyncAPI Generator.
34
35EXAMPLES
36 $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write
See code: src/commands/generate/fromTemplate.ts
asyncapi generate models LANGUAGE FILE
Generates typed models
1USAGE
2 $ asyncapi generate models LANGUAGE FILE [-h] [-o <value>] [--packageName <value>] [--namespace <value>]
3 [--tsModelType class|interface] [--tsEnumType enum|union] [--tsModuleSystem ESM|CJS] [--tsIncludeComments]
4 [--tsExportType default|named] [--tsJsonBinPack] [--tsMarshalling] [--tsExampleInstance] [--tsRawPropertyNames]
5 [--csharpAutoImplement] [--csharpNewtonsoft] [--csharpArrayType Array|List] [--csharpHashcode] [--csharpEqual]
6 [--csharpSystemJson] [--javaIncludeComments] [--javaJackson] [--javaConstraints] [--javaArrayType Array|List]
7 [--pyDantic] [--no-interactive] [--log-diagnostics] [--diagnostics-format
8 json|stylish|junit|html|text|teamcity|pretty] [--fail-severity error|warn|info|hint]
9
10ARGUMENTS
11 LANGUAGE (typescript|csharp|golang|java|javascript|dart|python|rust|kotlin|php|cplusplus|scala) The language you want
12 the typed models generated for.
13 FILE Path or URL to the AsyncAPI document, or context-name
14
15FLAGS
16 -h, --help Show CLI help.
17 -o, --output=<value> The output file name. Omitting this flag the result will be printed in the console.
18 --csharpArrayType=<option> [default: Array] C# specific, define which type of array needs to be generated.
19 <options: Array|List>
20 --csharpAutoImplement C# specific, define whether to generate auto-implemented properties or not.
21 --csharpEqual C# specific, generate the models with the Equal method overwritten
22 --csharpHashcode C# specific, generate the models with the GetHashCode method overwritten
23 --csharpNewtonsoft C# specific, generate the models with newtonsoft serialization support
24 --csharpSystemJson C# specific, generate the models with System.Text.Json serialization support
25 --diagnostics-format=<option> [default: stylish] format to use for validation diagnostics
26 <options: json|stylish|junit|html|text|teamcity|pretty>
27 --fail-severity=<option> [default: error] diagnostics of this level or above will trigger a failure exit
28 code
29 <options: error|warn|info|hint>
30 --javaArrayType=<option> [default: Array] Java specific, define which type of array needs to be generated.
31 <options: Array|List>
32 --javaConstraints Java specific, generate the models with constraints
33 --javaIncludeComments Java specific, if enabled add comments while generating models.
34 --javaJackson Java specific, generate the models with Jackson serialization support
35 --[no-]log-diagnostics log validation diagnostics or not
36 --namespace=<value> C#, C++ and PHP specific, define the namespace to use for the generated models.
37 This is required when language is `csharp`,`c++` or `php`.
38 --no-interactive Disable interactive mode and run with the provided flags.
39 --packageName=<value> Go, Java and Kotlin specific, define the package to use for the generated models.
40 This is required when language is `go`, `java` or `kotlin`.
41 --pyDantic Python specific, generate the Pydantic models.
42 --tsEnumType=<option> [default: enum] TypeScript specific, define which type of enums needs to be
43 generated.
44 <options: enum|union>
45 --tsExampleInstance Typescript specific, generate example of the model.
46 --tsExportType=<option> [default: default] TypeScript specific, define which type of export needs to be
47 generated.
48 <options: default|named>
49 --tsIncludeComments TypeScript specific, if enabled add comments while generating models.
50 --tsJsonBinPack TypeScript specific, define basic support for serializing to and from binary with
51 jsonbinpack.
52 --tsMarshalling TypeScript specific, generate the models with marshalling functions.
53 --tsModelType=<option> [default: class] TypeScript specific, define which type of model needs to be
54 generated.
55 <options: class|interface>
56 --tsModuleSystem=<option> [default: ESM] TypeScript specific, define the module system to be used.
57 <options: ESM|CJS>
58 --tsRawPropertyNames Typescript specific, generate the models using raw property names.
59
60DESCRIPTION
61 Generates typed models
See code: src/commands/generate/models.ts
asyncapi new
Creates a new asyncapi file
1USAGE
2 $ asyncapi new [-h] [-n <value>] [-e <value>] [-s] [-p <value>] [--no-tty]
3
4FLAGS
5 -e, --example=<value>
6 name of the example to use. Available examples are:
7 - simple-asyncapi.yml
8 - adeo-kafka-request-reply-asyncapi.yml
9 - anyof-asyncapi.yml
10 - application-headers-asyncapi.yml
11 - correlation-id-asyncapi.yml
12 - websocket-gemini-asyncapi.yml
13 - gitter-streaming-asyncapi.yml
14 - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml
15 - kraken-websocket-request-reply-multiple-channels-asyncapi.yml
16 - mercure-asyncapi.yml
17 - not-asyncapi.yml
18 - operation-security-asyncapi.yml
19 - oneof-asyncapi.yml
20 - rpc-client-asyncapi.yml
21 - rpc-server-asyncapi.yml
22 - slack-rtm-asyncapi.yml
23 - tutorial.yml
24 - streetlights-kafka-asyncapi.yml
25 - streetlights-operation-security-asyncapi.yml
26 - streetlights-mqtt-asyncapi.yml
27
28 -h, --help
29 Show CLI help.
30
31 -n, --file-name=<value>
32 name of the file
33
34 -p, --port=<value>
35 port in which to start Studio
36
37 -s, --studio
38 open in Studio
39
40 --no-tty
41 do not use an interactive terminal
42
43DESCRIPTION
44 Creates a new asyncapi file
45
46EXAMPLES
47 $ asyncapi new - start creation of a file in interactive mode
48
49 $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode
See code: src/commands/new/index.ts
asyncapi new file
Creates a new asyncapi file
1USAGE
2 $ asyncapi new file [-h] [-n <value>] [-e <value>] [-s] [-p <value>] [--no-tty]
3
4FLAGS
5 -e, --example=<value>
6 name of the example to use. Available examples are:
7 - simple-asyncapi.yml
8 - adeo-kafka-request-reply-asyncapi.yml
9 - anyof-asyncapi.yml
10 - application-headers-asyncapi.yml
11 - correlation-id-asyncapi.yml
12 - websocket-gemini-asyncapi.yml
13 - gitter-streaming-asyncapi.yml
14 - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml
15 - kraken-websocket-request-reply-multiple-channels-asyncapi.yml
16 - mercure-asyncapi.yml
17 - not-asyncapi.yml
18 - operation-security-asyncapi.yml
19 - oneof-asyncapi.yml
20 - rpc-client-asyncapi.yml
21 - rpc-server-asyncapi.yml
22 - slack-rtm-asyncapi.yml
23 - tutorial.yml
24 - streetlights-kafka-asyncapi.yml
25 - streetlights-operation-security-asyncapi.yml
26 - streetlights-mqtt-asyncapi.yml
27
28 -h, --help
29 Show CLI help.
30
31 -n, --file-name=<value>
32 name of the file
33
34 -p, --port=<value>
35 port in which to start Studio
36
37 -s, --studio
38 open in Studio
39
40 --no-tty
41 do not use an interactive terminal
42
43DESCRIPTION
44 Creates a new asyncapi file
45
46EXAMPLES
47 $ asyncapi new - start creation of a file in interactive mode
48
49 $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode
See code: src/commands/new/file.ts
asyncapi new glee
Creates a new Glee project
1USAGE
2 $ asyncapi new glee [-h] [-n <value>] [-t <value>] [-f <value>] [--force-write]
3
4FLAGS
5 -f, --file=<value> The path to the AsyncAPI file for generating a Glee project.
6 -h, --help Show CLI help.
7 -n, --name=<value> [default: project] Name of the Project
8 -t, --template=<value> [default: default] Name of the Template
9 --force-write Force writing of the generated files to given directory even if it is a git repo with unstaged
10 files or not empty dir (defaults to false)
11
12DESCRIPTION
13 Creates a new Glee project
See code: src/commands/new/glee.ts
asyncapi new template
Creates a new template
1USAGE
2 $ asyncapi new template [-h] [-n <value>] [-t <value>] [-f <value>] [--force-write] [-r <value>]
3
4FLAGS
5 -f, --file=<value> The path to the AsyncAPI file for generating a template.
6 -h, --help Show CLI help.
7 -n, --name=<value> [default: project] Name of the Project
8 -r, --renderer=<value> [default: react] Creating a template for particular engine, Its value can be either react or
9 nunjucks.
10 -t, --template=<value> [default: default] Name of the Template
11 --force-write Force writing of the generated files to given directory even if it is a git repo with unstaged
12 files or not empty dir (defaults to false)
13
14DESCRIPTION
15 Creates a new template
See code: src/commands/new/template.ts
asyncapi optimize [SPEC-FILE]
optimize asyncapi specification file
1USAGE
2 $ asyncapi optimize [SPEC-FILE] [-h] [-p
3 remove-components|reuse-components|move-duplicates-to-components|move-all-to-components...] [-i schema...] [-o
4 terminal|new-file|overwrite] [--no-tty]
5
6ARGUMENTS
7 SPEC-FILE spec path, url, or context-name
8
9FLAGS
10 -h, --help Show CLI help.
11 -i, --ignore=<option>... [default: ] list of components to be ignored from the optimization process
12 <options: schema>
13 -o, --output=<option> [default: terminal] select where you want the output.
14 <options: terminal|new-file|overwrite>
15 -p, --optimization=<option>... [default: remove-components,reuse-components,move-duplicates-to-components,move-all-to
16 -components] select the type of optimizations that you want to apply.
17 <options: remove-components|reuse-components|move-duplicates-to-components|move-all-to
18 -components>
19 --no-tty do not use an interactive terminal
20
21DESCRIPTION
22 optimize asyncapi specification file
23
24EXAMPLES
25 $ asyncapi optimize ./asyncapi.yaml
26
27 $ asyncapi optimize ./asyncapi.yaml --no-tty
28
29 $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components --optimization=reuse-components --optimization=move-all-to-components --no-tty
30
31 $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components --output=terminal --no-tty
32
33 $ asyncapi optimize ./asyncapi.yaml --ignore=schema
See code: src/commands/optimize.ts
asyncapi pretty SPEC-FILE
Format AsyncAPI specification file
1USAGE
2 $ asyncapi pretty SPEC-FILE [-o <value>]
3
4ARGUMENTS
5 SPEC-FILE spec path, url, or context-name
6
7FLAGS
8 -o, --output=<value> Output file path
9
10DESCRIPTION
11 Format AsyncAPI specification file
12
13EXAMPLES
14 $ asyncapi pretty ./asyncapi.yaml
15
16 $ asyncapi pretty ./asyncapi.yaml --output formatted-asyncapi.yaml
See code: src/commands/pretty.ts
asyncapi start
Starts AsyncAPI-related services. Currently, it supports launching the AsyncAPI Studio
1USAGE
2 $ asyncapi start
3
4DESCRIPTION
5 Starts AsyncAPI-related services. Currently, it supports launching the AsyncAPI Studio
See code: src/commands/start/index.ts
asyncapi start studio
starts a new local instance of Studio
1USAGE
2 $ asyncapi start studio [-h] [-f <value>] [-p <value>]
3
4FLAGS
5 -f, --file=<value> path to the AsyncAPI file to link with Studio
6 -h, --help Show CLI help.
7 -p, --port=<value> port in which to start Studio
8
9DESCRIPTION
10 starts a new local instance of Studio
See code: src/commands/start/studio.ts
asyncapi validate [SPEC-FILE]
validate asyncapi file
1USAGE
2 $ asyncapi validate [SPEC-FILE] [-h] [-w] [--log-diagnostics] [--diagnostics-format
3 json|stylish|junit|html|text|teamcity|pretty] [--fail-severity error|warn|info|hint] [-o <value>] [--score]
4
5ARGUMENTS
6 SPEC-FILE spec path, url, or context-name
7
8FLAGS
9 -h, --help Show CLI help.
10 -o, --output=<value> The output file name. Omitting this flag the result will be printed in the console.
11 -w, --watch Enable watch mode
12 --diagnostics-format=<option> [default: stylish] format to use for validation diagnostics
13 <options: json|stylish|junit|html|text|teamcity|pretty>
14 --fail-severity=<option> [default: error] diagnostics of this level or above will trigger a failure exit
15 code
16 <options: error|warn|info|hint>
17 --[no-]log-diagnostics log validation diagnostics or not
18 --score Compute the score of the AsyncAPI document. Scoring is based on whether the
19 document has description, license, server and/or channels.
20
21DESCRIPTION
22 validate asyncapi file
See code: src/commands/validate.ts