You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ CLI to work with your AsyncAPI files. Currently under development, we are workin
13
13
-[Installation](#installation)
14
14
-[Usage](#usage)
15
15
-[Architecture](#architecture)
16
+
-[Debugging & Testing](#debugging--testing)
16
17
-[Github Action](#github-action)
17
18
-[Contributing](#contributing)
18
19
*[Set up development environment](#set-up-development-environment)
@@ -30,6 +31,9 @@ The [usage guide](/docs/usage.md) provides information about different ways to u
30
31
## Architecture
31
32
The [architecture guide](/docs/architecture.md) provides information about the architecture.
32
33
34
+
## Debugging & Testing
35
+
The [debugging & testing guide](/docs/debugging-testing.md) provides step-by-step instructions for debugging CLI commands, API endpoints, and services, along with comprehensive testing guidelines.
36
+
33
37
## Github Action
34
38
35
39
The AsyncAPI CLI can be used as a GitHub Action. You can find more information in the [GitHub Action guide](https://www.asyncapi.com/docs/tools/cli/github-action).
The AsyncAPI CLI uses oclif (Open CLI Framework) as its core framework, which enables developers to build powerful and scalable command-line applications.
6
+
# CLI Architecture
7
7
8
-
**Structure of the AsyncAPI CLI**: The CLI is primarily divided into two components: commands and the core part.
8
+
## Overview
9
9
10
-
1.**Command Component**: The commands include all the necessary functionalities that help developers interact with features like creating new AsyncAPI projects, validating AsyncAPI files, formatting AsyncAPI files, and more.
11
-
2.**Core Component**: The core part of the CLI contains various utilities that facilitate the efficient creation of new commands.
10
+
The AsyncAPI CLI is built with [oclif](https://oclif.io/) and provides both command-line operations and a REST API server for working with AsyncAPI specifications.
12
11
13
12
---
14
13
15
-
### Detailed Explanation of Key Directories in the CLI
16
-
17
-
#### `src/commands/`
18
-
-**Purpose:** Implements the CLI commands available to the user.
19
-
-**Subdirectories:**
20
-
-`config/`: Stores configuration-related files for commands.
21
-
-`generate/`: Generates typed models or other artifacts like clients, applications, or documentation using AsyncAPI Generator templates.
22
-
-**Files:**
23
-
-`fromTemplate.ts`: Contains logic for generating files using templates.
24
-
-`models.ts`: Defines the models used during generation.
25
-
-`new/`: Create a new AsyncAPI project, specification files, or templates for clients and applications.
26
-
-**Files:**
27
-
-`file.ts`: Handles file creation logic.
28
-
-`template.ts`: Manages templates for new projects.
29
-
-`start/`: Implements starting functionalities like launching a local server or studio.
30
-
-**Files:**
31
-
-`studio.ts`: Integrates with the AsyncAPI Studio.
32
-
33
-
-**Standalone Files:**
34
-
-`bundle.ts`: Bundles one or multiple AsyncAPI documents and their references together.
35
-
-`convert.ts`: Converts AsyncAPI documents from older to newer versions or transforms OpenAPI/Postman-collection documents into AsyncAPI.
36
-
-`diff.ts`: Compares two AsyncAPI documents.
37
-
-`format.ts`: Converts AsyncAPI documents from any format to YAML, YML, or JSON.
38
-
-`optimize.ts`: Optimizes AsyncAPI documents for performance.
39
-
-`pretty.ts`: Beautifies the AsyncAPI spec file (indentation, styling) in place or outputs the formatted spec to a new file.
40
-
-`validate.ts`: Validates AsyncAPI documents for correctness.
0 commit comments