@apimatic/cli 1.0.1-alpha.5 → 1.0.1-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -15
- package/lib/commands/api/transform.js +10 -2
- package/lib/commands/portal/generate.js +1 -1
- package/lib/commands/sdk/generate.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ $ npm install -g @apimatic/cli
|
|
|
16
16
|
$ apimatic COMMAND
|
|
17
17
|
running command...
|
|
18
18
|
$ apimatic (-v|--version|version)
|
|
19
|
-
@apimatic/cli/1.0.1-alpha.
|
|
19
|
+
@apimatic/cli/1.0.1-alpha.6 linux-x64 node-v16.13.0
|
|
20
20
|
$ apimatic --help [COMMAND]
|
|
21
21
|
USAGE
|
|
22
22
|
$ apimatic COMMAND
|
|
@@ -51,7 +51,7 @@ EXAMPLE
|
|
|
51
51
|
$ apimatic api --help
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
_See code: [src/commands/api/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
54
|
+
_See code: [src/commands/api/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/api/index.ts)_
|
|
55
55
|
|
|
56
56
|
## `apimatic api:transform`
|
|
57
57
|
|
|
@@ -64,7 +64,10 @@ USAGE
|
|
|
64
64
|
OPTIONS
|
|
65
65
|
-f, --force overwrite if same file exist in the destination
|
|
66
66
|
--auth-key=auth-key override current authentication state with an authentication key
|
|
67
|
-
|
|
67
|
+
|
|
68
|
+
--destination=destination [default: /home/runner/work/apimatic-cli/apimatic-cli/cli] directory to download
|
|
69
|
+
transformed file to
|
|
70
|
+
|
|
68
71
|
--file=file path to the API specification file to transform
|
|
69
72
|
|
|
70
73
|
--format=format (required) specification format to transform API specification into
|
|
@@ -82,7 +85,7 @@ EXAMPLES
|
|
|
82
85
|
Success! Your transformed file is located at D:/swagger_raml.yaml
|
|
83
86
|
```
|
|
84
87
|
|
|
85
|
-
_See code: [src/commands/api/transform.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
88
|
+
_See code: [src/commands/api/transform.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/api/transform.ts)_
|
|
86
89
|
|
|
87
90
|
## `apimatic api:validate`
|
|
88
91
|
|
|
@@ -107,7 +110,7 @@ EXAMPLES
|
|
|
107
110
|
Specification file provided is valid
|
|
108
111
|
```
|
|
109
112
|
|
|
110
|
-
_See code: [src/commands/api/validate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
113
|
+
_See code: [src/commands/api/validate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/api/validate.ts)_
|
|
111
114
|
|
|
112
115
|
## `apimatic auth`
|
|
113
116
|
|
|
@@ -121,7 +124,7 @@ EXAMPLE
|
|
|
121
124
|
$ apimatic auth --help
|
|
122
125
|
```
|
|
123
126
|
|
|
124
|
-
_See code: [src/commands/auth/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
127
|
+
_See code: [src/commands/auth/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/auth/index.ts)_
|
|
125
128
|
|
|
126
129
|
## `apimatic auth:login`
|
|
127
130
|
|
|
@@ -145,7 +148,7 @@ EXAMPLES
|
|
|
145
148
|
Authentication key successfully set
|
|
146
149
|
```
|
|
147
150
|
|
|
148
|
-
_See code: [src/commands/auth/login.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
151
|
+
_See code: [src/commands/auth/login.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/auth/login.ts)_
|
|
149
152
|
|
|
150
153
|
## `apimatic auth:logout`
|
|
151
154
|
|
|
@@ -160,7 +163,7 @@ EXAMPLE
|
|
|
160
163
|
Logged out
|
|
161
164
|
```
|
|
162
165
|
|
|
163
|
-
_See code: [src/commands/auth/logout.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
166
|
+
_See code: [src/commands/auth/logout.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/auth/logout.ts)_
|
|
164
167
|
|
|
165
168
|
## `apimatic auth:status`
|
|
166
169
|
|
|
@@ -175,7 +178,7 @@ EXAMPLE
|
|
|
175
178
|
Currently logged in as apimatic-client@gmail.com
|
|
176
179
|
```
|
|
177
180
|
|
|
178
|
-
_See code: [src/commands/auth/status.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
181
|
+
_See code: [src/commands/auth/status.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/auth/status.ts)_
|
|
179
182
|
|
|
180
183
|
## `apimatic autocomplete [SHELL]`
|
|
181
184
|
|
|
@@ -229,7 +232,7 @@ EXAMPLE
|
|
|
229
232
|
$apimatic portal --help
|
|
230
233
|
```
|
|
231
234
|
|
|
232
|
-
_See code: [src/commands/portal/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
235
|
+
_See code: [src/commands/portal/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/portal/index.ts)_
|
|
233
236
|
|
|
234
237
|
## `apimatic portal:generate`
|
|
235
238
|
|
|
@@ -242,7 +245,7 @@ USAGE
|
|
|
242
245
|
OPTIONS
|
|
243
246
|
-f, --force overwrite if a portal exists in the destination
|
|
244
247
|
--auth-key=auth-key override current authentication state with an authentication key
|
|
245
|
-
--destination=destination [default:
|
|
248
|
+
--destination=destination [default: /home/runner/work/apimatic-cli/apimatic-cli/cli] path to the downloaded portal
|
|
246
249
|
--folder=folder path to the input directory containing API specifications and config files
|
|
247
250
|
--zip download the generated portal as a .zip archive
|
|
248
251
|
|
|
@@ -251,7 +254,7 @@ EXAMPLE
|
|
|
251
254
|
Your portal has been generated at D:/
|
|
252
255
|
```
|
|
253
256
|
|
|
254
|
-
_See code: [src/commands/portal/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
257
|
+
_See code: [src/commands/portal/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/portal/generate.ts)_
|
|
255
258
|
|
|
256
259
|
## `apimatic sdk`
|
|
257
260
|
|
|
@@ -265,7 +268,7 @@ EXAMPLE
|
|
|
265
268
|
$apimatic sdk --help
|
|
266
269
|
```
|
|
267
270
|
|
|
268
|
-
_See code: [src/commands/sdk/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
271
|
+
_See code: [src/commands/sdk/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/sdk/index.ts)_
|
|
269
272
|
|
|
270
273
|
## `apimatic sdk:generate`
|
|
271
274
|
|
|
@@ -278,7 +281,10 @@ USAGE
|
|
|
278
281
|
OPTIONS
|
|
279
282
|
-f, --force overwrite if an SDK already exists in the destination
|
|
280
283
|
--auth-key=auth-key override current authentication state with an authentication key
|
|
281
|
-
|
|
284
|
+
|
|
285
|
+
--destination=destination [default: /home/runner/work/apimatic-cli/apimatic-cli/cli] directory to download the
|
|
286
|
+
generated SDK to
|
|
287
|
+
|
|
282
288
|
--file=file path to the API specification to generate SDKs for
|
|
283
289
|
|
|
284
290
|
--platform=platform (required) language platform for sdk
|
|
@@ -303,5 +309,5 @@ EXAMPLES
|
|
|
303
309
|
Success! Your SDK is located at swagger_sdk_csharp
|
|
304
310
|
```
|
|
305
311
|
|
|
306
|
-
_See code: [src/commands/sdk/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
312
|
+
_See code: [src/commands/sdk/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.6/src/commands/sdk/generate.ts)_
|
|
307
313
|
<!-- commandsstop -->
|
|
@@ -88,12 +88,20 @@ Transform.flags = {
|
|
|
88
88
|
(OpenApi3Json|OpenApi3Yaml|APIMATIC|WADL2009|WADL2006|WSDL|
|
|
89
89
|
Swagger10|Swagger20|SwaggerYaml|RAML|RAML10|Postman10|Postman20)`
|
|
90
90
|
}),
|
|
91
|
-
file: command_1.flags.string({
|
|
91
|
+
file: command_1.flags.string({
|
|
92
|
+
parse: (input) => path.resolve(input),
|
|
93
|
+
default: "",
|
|
94
|
+
description: "path to the API specification file to transform"
|
|
95
|
+
}),
|
|
92
96
|
url: command_1.flags.string({
|
|
93
97
|
default: "",
|
|
94
98
|
description: "URL to the API specification file to transform. Can be used in place of the --file option if the API specification is publicly available."
|
|
95
99
|
}),
|
|
96
|
-
destination: command_1.flags.string({
|
|
100
|
+
destination: command_1.flags.string({
|
|
101
|
+
parse: (input) => path.resolve(input),
|
|
102
|
+
default: path.resolve("./"),
|
|
103
|
+
description: "directory to download transformed file to"
|
|
104
|
+
}),
|
|
97
105
|
force: command_1.flags.boolean({ char: "f", default: false, description: "overwrite if same file exist in the destination" }),
|
|
98
106
|
"auth-key": command_1.flags.string({ description: "override current authentication state with an authentication key" })
|
|
99
107
|
};
|
|
@@ -87,7 +87,7 @@ PortalGenerate.flags = {
|
|
|
87
87
|
}),
|
|
88
88
|
destination: command_1.flags.string({
|
|
89
89
|
parse: (input) => path.resolve(input),
|
|
90
|
-
default: "./",
|
|
90
|
+
default: path.resolve("./"),
|
|
91
91
|
description: "path to the downloaded portal"
|
|
92
92
|
}),
|
|
93
93
|
force: command_1.flags.boolean({ char: "f", default: false, description: "overwrite if a portal exists in the destination" }),
|
|
@@ -103,7 +103,7 @@ Legacy: CS_NET_STANDARD_LIB|CS_PORTABLE_NET_LIB|CS_UNIVERSAL_WINDOWS_PLATFORM_LI
|
|
|
103
103
|
}),
|
|
104
104
|
destination: command_1.flags.string({
|
|
105
105
|
parse: (input) => path.resolve(input),
|
|
106
|
-
default: "./",
|
|
106
|
+
default: path.resolve("./"),
|
|
107
107
|
description: "directory to download the generated SDK to"
|
|
108
108
|
}),
|
|
109
109
|
force: command_1.flags.boolean({
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.1-alpha.
|
|
1
|
+
{"version":"1.0.1-alpha.6","commands":{"api":{"id":"api","description":"Manage APIs","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic api --help"],"flags":{},"args":[]},"api:transform":{"id":"api:transform","description":"Transform API specifications from one format to another. Supports [10+ different formats](https://www.apimatic.io/transformer/#supported-formats) including OpenApi/Swagger, RAML, WSDL and Postman Collections.","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic api:transform --format=\"OpenApi3Json\" --file=\"./specs/sample.json\" --destination=\"D:/\"\nSuccess! Your transformed file is located at D:/Transformed_OpenApi3Json.json\n","$ apimatic api:transform --format=RAML --url=\"https://petstore.swagger.io/v2/swagger.json\" --destination=\"D:/\"\nSuccess! Your transformed file is located at D:/swagger_raml.yaml\n"],"flags":{"format":{"name":"format","type":"option","description":"specification format to transform API specification into\n(OpenApi3Json|OpenApi3Yaml|APIMATIC|WADL2009|WADL2006|WSDL|\nSwagger10|Swagger20|SwaggerYaml|RAML|RAML10|Postman10|Postman20)","required":true},"file":{"name":"file","type":"option","description":"path to the API specification file to transform","default":""},"url":{"name":"url","type":"option","description":"URL to the API specification file to transform. Can be used in place of the --file option if the API specification is publicly available.","default":""},"destination":{"name":"destination","type":"option","description":"directory to download transformed file to","default":"/home/runner/work/apimatic-cli/apimatic-cli/cli"},"force":{"name":"force","type":"boolean","char":"f","description":"overwrite if same file exist in the destination","allowNo":false},"auth-key":{"name":"auth-key","type":"option","description":"override current authentication state with an authentication key"}},"args":[]},"api:validate":{"id":"api:validate","description":"Validate the syntactic and semantic correctness of an API specification","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic api:validate --file=\"./specs/sample.json\"\nSpecification file provided is valid\n","$ apimatic api:validate --url=https://petstore.swagger.io/v2/swagger.json\nSpecification file provided is valid\n"],"flags":{"file":{"name":"file","type":"option","description":"Path to the API specification file to validate","default":""},"url":{"name":"url","type":"option","description":"URL to the specification file to validate. Can be used in place of the --file option if the API specification is publicly available.","default":""},"auth-key":{"name":"auth-key","type":"option","description":"override current authentication state with an authentication key"}},"args":[]},"auth":{"id":"auth","description":"Manage this CLI's authentication state.","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic auth --help"],"flags":{},"args":[]},"auth:login":{"id":"auth:login","description":"Login using your APIMatic credentials or an API Key","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic auth:login\nPlease enter your registered email: apimatic-user@gmail.com\nPlease enter your password: *********\n\nYou have successfully logged into APIMatic\n","$ apimatic auth:login --auth-key=xxxxxx\nAuthentication key successfully set"],"flags":{"auth-key":{"name":"auth-key","type":"option","description":"Set authentication key for all commands","default":""}},"args":[]},"auth:logout":{"id":"auth:logout","description":"Clear local login credentials","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic auth:logout\nLogged out\n"],"flags":{},"args":[]},"auth:status":{"id":"auth:status","description":"View current authentication state","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic auth:status\nCurrently logged in as apimatic-client@gmail.com\n"],"flags":{},"args":[]},"portal:generate":{"id":"portal:generate","description":"Generate and download a static API Documentation portal. Requires an input directory containing API specifications, a config file and optionally, markdown guides. For details, refer to the [documentation](https://portal-api-docs.apimatic.io/#/http/generating-api-portal/build-file)","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic portal:generate --folder=\"./portal/\" --destination=\"D:/\"\nYour portal has been generated at D:/\n"],"flags":{"folder":{"name":"folder","type":"option","description":"path to the input directory containing API specifications and config files","default":""},"destination":{"name":"destination","type":"option","description":"path to the downloaded portal","default":"/home/runner/work/apimatic-cli/apimatic-cli/cli"},"force":{"name":"force","type":"boolean","char":"f","description":"overwrite if a portal exists in the destination","allowNo":false},"zip":{"name":"zip","type":"boolean","description":"download the generated portal as a .zip archive","allowNo":false},"auth-key":{"name":"auth-key","type":"option","description":"override current authentication state with an authentication key","default":""}},"args":[]},"portal":{"id":"portal","description":"Manage API documentation portals","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$apimatic portal --help"],"flags":{},"args":[]},"sdk:generate":{"id":"sdk:generate","description":"Generate SDK for your APIs","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic sdk:generate --platform=\"CSHARP\" --file=\"./specs/sample.json\"\nGenerating SDK... done\nDownloading SDK... done\nSuccess! Your SDK is located at swagger_sdk_csharp","$ apimatic sdk:generate --platform=\"CSHARP\" --url=https://petstore.swagger.io/v2/swagger.json\nGenerating SDK... done\nDownloading SDK... done\nSuccess! Your SDK is located at swagger_sdk_csharp\n"],"flags":{"platform":{"name":"platform","type":"option","description":"language platform for sdk\nSimple: CSHARP|JAVA|PYTHON|RUBY|PHP|TYPESCRIPT\nLegacy: CS_NET_STANDARD_LIB|CS_PORTABLE_NET_LIB|CS_UNIVERSAL_WINDOWS_PLATFORM_LIB|\n JAVA_ECLIPSE_JRE_LIB|PHP_GENERIC_LIB|PYTHON_GENERIC_LIB|RUBY_GENERIC_LIB|\n TS_GENERIC_LIB","required":true},"file":{"name":"file","type":"option","description":"path to the API specification to generate SDKs for","default":""},"url":{"name":"url","type":"option","description":"URL to the API specification to generate SDKs for. Can be used in place of the --file option if the API specification is publicly available.","default":""},"destination":{"name":"destination","type":"option","description":"directory to download the generated SDK to","default":"/home/runner/work/apimatic-cli/apimatic-cli/cli"},"force":{"name":"force","type":"boolean","char":"f","description":"overwrite if an SDK already exists in the destination","allowNo":false},"zip":{"name":"zip","type":"boolean","description":"download the generated SDK as a .zip archive","allowNo":false},"auth-key":{"name":"auth-key","type":"option","description":"override current authentication state with an authentication key","default":""}},"args":[]},"sdk":{"id":"sdk","description":"Generate and manage SDKs for APIs","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$apimatic sdk --help"],"flags":{},"args":[]}}}
|