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: docs/architecture.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,41 +3,41 @@ title: 'CLI Architecture'
3
3
weight: 40
4
4
---
5
5
6
-
The AsyncAPI CLI uses oclif (Open CLI Framework) as its core framework, which allows customers to build powerful and scalable command-line applications.
6
+
The AsyncAPI CLI uses oclif (Open CLI Framework) as its core framework, which enables developers to build powerful and scalable command-line applications.
7
7
8
-
**Structure of the Asyncapi CLI**: The CLI mainly divides into two components that is commands and the core part.
9
-
10
-
1.**Command Component** : The Commands contains all the necessary commands that helps to developers to interact with multiple functionality like creating new Asyncapi projects, validating asyncapi file, formatting asyncapi file etc.
11
-
2.**Core Component**: The Core part of the CLI contains all teh
8
+
**Structure of the AsyncAPI CLI**: The CLI is primarily divided into two components: commands and the core part.
12
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.
13
12
13
+
---
14
14
15
-
### **Detailed Explanation of Key Directories**
15
+
### **Detailed Explanation of Key Directories in the CLI**
16
16
17
17
#### **`src/commands/`**
18
18
-**Purpose:** Implements the CLI commands available to the user.
19
19
-**Subdirectories:**
20
20
-`config/`: Stores configuration-related files for commands.
21
-
-`generate/`: Implements logic for generating AsyncAPI-related artifacts.
21
+
-`generate/`: Generates typed models or other artifacts like clients, applications, or documentation using AsyncAPI Generator templates.
22
22
-**Files:**
23
-
-`fromTemplate.ts`: Logic for generating files using templates.
24
-
-`models.ts`: Defines the models used in generation.
25
-
-`new/`: Logic for creating new AsyncAPI projects.
23
+
-`fromTemplate.ts`: Contains logic for generating files using templates.
24
+
-`models.ts`: Defines the models used during generation.
25
+
-`new/`: Creates a new AsyncAPI file.
26
26
-**Files:**
27
27
-`file.ts`: Handles file creation logic.
28
28
-`glee.ts`: Related to Glee, a tool for event-driven microservices.
29
-
-`template.ts`: Deals with templates for new projects.
30
-
-`start/`: Implements starting functionalities like starting a local server or studio.
29
+
-`template.ts`: Manages templates for new projects.
30
+
-`start/`: Implements starting functionalities like launching a local server or studio.
31
31
-**Files:**
32
32
-`studio.ts`: Integrates with the AsyncAPI Studio.
33
33
34
34
-**Standalone Files:**
35
-
-`bundle.ts`: Bundles multiple AsyncAPI files.
36
-
-`convert.ts`: Converts AsyncAPI documents between different formats.
35
+
-`bundle.ts`: Bundles one or multiple AsyncAPI documents and their references together.
36
+
-`convert.ts`: Converts AsyncAPI documents from older to newer versions or transforms OpenAPI/Postman-collection documents into AsyncAPI.
37
37
-`diff.ts`: Compares two AsyncAPI documents.
38
-
-`format.ts`: Formats AsyncAPI documents.
38
+
-`format.ts`: Converts AsyncAPI documents from any format to YAML, YML, or JSON.
39
39
-`optimize.ts`: Optimizes AsyncAPI documents for performance.
40
-
-`pretty.ts`: Prettifies AsyncAPI documents.
40
+
-`pretty.ts`: Beautifies the AsyncAPI spec file (indentation, styling) in place or outputs the formatted spec to a new file.
41
41
-`validate.ts`: Validates AsyncAPI documents for correctness.
42
42
43
43
---
@@ -93,6 +93,6 @@ The AsyncAPI CLI uses oclif (Open CLI Framework) as its core framework, which al
93
93
7.**Convert Between Formats:**
94
94
- The `convert` command supports converting AsyncAPI documents between formats like YAML and JSON.
95
95
96
+
---
96
97
97
-
98
-
This structure ensures the CLI is modular, scalable, and easy to maintain. Let me know if you need further clarification or additional details!
98
+
This structure ensures the CLI is modular, scalable, and easy to maintain. Let me know if you need further clarification or additional details!
0 commit comments