1
- ---
2
- title : ' Usage'
3
- weight : 40
4
- ---
5
-
6
- <!--
7
-
8
- This file is automatically generated from updateUsageDocs.js script. In package.json in line 158-161 lines the following steps has been executed in order to run this script successfully -
9
-
10
- * generate:readme:create: It creates the initial content for the README file by printing the usage and commands tags using printf and redirects the output to scripts/README.md file.
11
- * generate:readme:commands: It changes the directory to the scripts folder and executes the oclif readme command. This command generates the usage and commands sections based on the CLI commands and updates the content in the scripts/README.md file.
12
- * generate:assets: This script combines the two previously mentioned scripts (generate:readme:toc and generate:commands) to generate the necessary assets, such as the README file and usage documentation.
13
- * generate:commands: This script executes the following steps:
14
- - Runs the generate:readme:create script to create the initial content for the README file.
15
- - Executes the generate:readme:commands script to generate the usage and commands sections based on the CLI commands.
16
- - Runs the updateUsageDocs.js script using Node.js to update the usage documentation file with the contents of the generated README file.
17
- - Deletes the scripts/README.md file using the rimraf command.
18
-
19
- -->
20
-
21
1
The Modelina CLI makes it easier to generate AsyncAPI Models.
22
2
23
-
3
+ # Table of contents
4
+ <!-- toc -->
5
+ * [ Table of contents] ( #table-of-contents )
6
+ * [ Usage] ( #usage )
7
+ * [ Commands] ( #commands )
8
+ <!-- tocstop -->
24
9
# Usage
25
-
26
10
<!-- usage -->
27
11
``` sh-session
28
12
$ npm install -g @asyncapi/modelina-cli
29
13
$ modelina COMMAND
30
14
running command...
31
15
$ modelina (--version)
32
- @asyncapi/modelina-cli/4.0.0-next.22 linux -x64 node-v18.19.1
16
+ @asyncapi/modelina-cli/4.0.0-next.23 darwin -x64 node-v18.19.0
33
17
$ modelina --help [COMMAND]
34
18
USAGE
35
19
$ modelina COMMAND
36
20
...
37
21
```
38
22
<!-- usagestop -->
39
-
40
23
# Commands
41
-
42
24
<!-- commands -->
43
25
* [ ` modelina config ` ] ( #modelina-config )
44
26
* [ ` modelina config context ` ] ( #modelina-config-context )
45
27
* [ ` modelina config context add CONTEXT-NAME SPEC-FILE-PATH ` ] ( #modelina-config-context-add-context-name-spec-file-path )
46
28
* [ ` modelina config context current ` ] ( #modelina-config-context-current )
47
29
* [ ` modelina config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH ` ] ( #modelina-config-context-edit-context-name-new-spec-file-path )
48
- * [ ` modelina config context init [ CONTEXT-FILE-PATH] ` ] ( #modelina-config-context-init-context-file-path )
30
+ * [ ` modelina config context init CONTEXT-FILE-PATH ` ] ( #modelina-config-context-init-context-file-path )
49
31
* [ ` modelina config context list ` ] ( #modelina-config-context-list )
50
32
* [ ` modelina config context remove CONTEXT-NAME ` ] ( #modelina-config-context-remove-context-name )
51
33
* [ ` modelina config context use CONTEXT-NAME ` ] ( #modelina-config-context-use-context-name )
@@ -63,7 +45,7 @@ DESCRIPTION
63
45
CLI config settings
64
46
```
65
47
66
- _ See code: [ src/commands/config/index.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/index.ts ) _
48
+ _ See code: [ src/commands/config/index.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/index.ts ) _
67
49
68
50
## ` modelina config context `
69
51
@@ -77,7 +59,7 @@ DESCRIPTION
77
59
Manage short aliases for full paths to inputs
78
60
```
79
61
80
- _ See code: [ src/commands/config/context/index.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/context/index.ts ) _
62
+ _ See code: [ src/commands/config/context/index.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/context/index.ts ) _
81
63
82
64
## ` modelina config context add CONTEXT-NAME SPEC-FILE-PATH `
83
65
89
71
90
72
ARGUMENTS
91
73
CONTEXT-NAME context name
92
- SPEC-FILE-PATH file path of the input document
74
+ SPEC-FILE-PATH file path of the spec file
93
75
94
76
FLAGS
95
77
-h, --help Show CLI help.
@@ -99,7 +81,7 @@ DESCRIPTION
99
81
Add a context to the store
100
82
```
101
83
102
- _ See code: [ src/commands/config/context/add.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/context/add.ts ) _
84
+ _ See code: [ src/commands/config/context/add.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/context/add.ts ) _
103
85
104
86
## ` modelina config context current `
105
87
@@ -116,7 +98,7 @@ DESCRIPTION
116
98
Shows the current context that is being used
117
99
```
118
100
119
- _ See code: [ src/commands/config/context/current.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/context/current.ts ) _
101
+ _ See code: [ src/commands/config/context/current.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/context/current.ts ) _
120
102
121
103
## ` modelina config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH `
122
104
@@ -128,7 +110,7 @@ USAGE
128
110
129
111
ARGUMENTS
130
112
CONTEXT-NAME context name
131
- NEW-SPEC-FILE-PATH new file path of the input
113
+ NEW-SPEC-FILE-PATH file path of the spec file
132
114
133
115
FLAGS
134
116
-h, --help Show CLI help.
@@ -137,15 +119,15 @@ DESCRIPTION
137
119
Edit a context in the store
138
120
```
139
121
140
- _ See code: [ src/commands/config/context/edit.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/context/edit.ts ) _
122
+ _ See code: [ src/commands/config/context/edit.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/context/edit.ts ) _
141
123
142
- ## ` modelina config context init [ CONTEXT-FILE-PATH] `
124
+ ## ` modelina config context init CONTEXT-FILE-PATH `
143
125
144
126
Initialize context
145
127
146
128
```
147
129
USAGE
148
- $ modelina config context init [ CONTEXT-FILE-PATH] [-h]
130
+ $ modelina config context init CONTEXT-FILE-PATH [-h]
149
131
150
132
ARGUMENTS
151
133
CONTEXT-FILE-PATH Specify directory in which context file should be created:
@@ -160,7 +142,7 @@ DESCRIPTION
160
142
Initialize context
161
143
```
162
144
163
- _ See code: [ src/commands/config/context/init.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/context/init.ts ) _
145
+ _ See code: [ src/commands/config/context/init.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/context/init.ts ) _
164
146
165
147
## ` modelina config context list `
166
148
@@ -177,7 +159,7 @@ DESCRIPTION
177
159
List all the stored contexts in the store
178
160
```
179
161
180
- _ See code: [ src/commands/config/context/list.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/context/list.ts ) _
162
+ _ See code: [ src/commands/config/context/list.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/context/list.ts ) _
181
163
182
164
## ` modelina config context remove CONTEXT-NAME `
183
165
@@ -197,7 +179,7 @@ DESCRIPTION
197
179
Delete a context from the store
198
180
```
199
181
200
- _ See code: [ src/commands/config/context/remove.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/context/remove.ts ) _
182
+ _ See code: [ src/commands/config/context/remove.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/context/remove.ts ) _
201
183
202
184
## ` modelina config context use CONTEXT-NAME `
203
185
@@ -217,7 +199,7 @@ DESCRIPTION
217
199
Set a context as current
218
200
```
219
201
220
- _ See code: [ src/commands/config/context/use.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/config/context/use.ts ) _
202
+ _ See code: [ src/commands/config/context/use.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/config/context/use.ts ) _
221
203
222
204
## ` modelina generate LANGUAGE FILE `
223
205
@@ -237,40 +219,42 @@ ARGUMENTS
237
219
FILE Path or URL to the AsyncAPI document, or context-name
238
220
239
221
FLAGS
240
- -h, --help Show CLI help.
241
- -o, --output=<value> The output directory where the models should be written to. Omitting this flag will write
242
- the models to `stdout`.
243
- --csharpArrayType=<option> [default: Array] C# specific, define which type of array needs to be generated.
244
- <options: Array|List>
245
- --csharpAutoImplement C# specific, define whether to generate auto-implemented properties or not.
246
- --csharpEqual C# specific, generate the models with the Equal method overwritten
247
- --csharpHashcode C# specific, generate the models with the GetHashCode method overwritten
248
- --csharpNewtonsoft C# specific, generate the models with newtonsoft serialization support
249
- --csharpSystemJson C# specific, generate the models with System.Text.Json serialization support
250
- --javaConstraints Java specific, generate the models with constraints
251
- --javaIncludeComments Java specific, if enabled add comments while generating models.
252
- --javaJackson Java specific, generate the models with Jackson serialization support
253
- --namespace=<value> C#, C++ and PHP specific, define the namespace to use for the generated models. This is
254
- required when language is `csharp`,`c++` or `php`.
255
- --packageName=<value> Go, Java and Kotlin specific, define the package to use for the generated models. This is
256
- required when language is `go`, `java` or `kotlin`.
257
- --tsEnumType=<option> [default: enum] TypeScript specific, define which type of enums needs to be generated.
258
- <options: enum|union>
259
- --tsExampleInstance Typescript specific, generate example of the model.
260
- --tsExportType=<option> [default: default] TypeScript specific, define which type of export needs to be generated.
261
- <options: default|named>
262
- --tsIncludeComments TypeScript specific, if enabled add comments while generating models.
263
- --tsJsonBinPack TypeScript specific, define basic support for serializing to and from binary with
264
- jsonbinpack.
265
- --tsMarshalling TypeScript specific, generate the models with marshalling functions.
266
- --tsModelType=<option> [default: class] TypeScript specific, define which type of model needs to be generated.
267
- <options: class|interface>
268
- --tsModuleSystem=<option> [default: ESM] TypeScript specific, define the module system to be used.
269
- <options: ESM|CJS>
222
+ -h, --help Show CLI help.
223
+ -o, --output=<value> The output directory where the models should be written to. Omitting this flag will
224
+ write the models to `stdout`.
225
+ --csharpArrayType=<option> [default: Array] C# specific, define which type of array needs to be generated.
226
+ <options: Array|List>
227
+ --csharpAutoImplement C# specific, define whether to generate auto-implemented properties or not.
228
+ --csharpEqual C# specific, generate the models with the Equal method overwritten
229
+ --csharpHashcode C# specific, generate the models with the GetHashCode method overwritten
230
+ --csharpNewtonsoft C# specific, generate the models with newtonsoft serialization support
231
+ --csharpSystemJson C# specific, generate the models with System.Text.Json serialization support
232
+ --javaConstraints Java specific, generate the models with constraints
233
+ --javaIncludeComments Java specific, if enabled add comments while generating models.
234
+ --javaJackson Java specific, generate the models with Jackson serialization support
235
+ --namespace=<value> C#, C++ and PHP specific, define the namespace to use for the generated models. This
236
+ is required when language is `csharp`,`c++` or `php`.
237
+ --packageName=<value> Go, Java and Kotlin specific, define the package to use for the generated models. This
238
+ is required when language is `go`, `java` or `kotlin`.
239
+ --tsEnumType=<option> [default: enum] TypeScript specific, define which type of enums needs to be generated.
240
+ <options: enum|union>
241
+ --tsExampleInstance Typescript specific, generate example of the model.
242
+ --tsExportType=<option> [default: default] TypeScript specific, define which type of export needs to be
243
+ generated.
244
+ <options: default|named>
245
+ --tsIncludeComments TypeScript specific, if enabled add comments while generating models.
246
+ --tsJsonBinPack TypeScript specific, define basic support for serializing to and from binary with
247
+ jsonbinpack.
248
+ --tsMarshalling TypeScript specific, generate the models with marshalling functions.
249
+ --tsModelType=<option> [default: class] TypeScript specific, define which type of model needs to be
250
+ generated.
251
+ <options: class|interface>
252
+ --tsModuleSystem=<option> [default: ESM] TypeScript specific, define the module system to be used.
253
+ <options: ESM|CJS>
270
254
271
255
DESCRIPTION
272
256
Generates typed models
273
257
```
274
258
275
- _ See code: [ src/commands/generate.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.22 /src/commands/generate.ts ) _
259
+ _ See code: [ src/commands/generate.ts] ( https://github.com/asyncapi/modelina/blob/v4.0.0-next.23 /src/commands/generate.ts ) _
276
260
<!-- commandsstop -->
0 commit comments