swaggerhub-cli 0.3.0 → 0.6.1
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 +396 -68
- package/oclif.manifest.json +1 -1
- package/package.json +23 -20
- package/src/commands/api/create.js +7 -6
- package/src/commands/api/delete.js +63 -0
- package/src/commands/api/publish.js +1 -1
- package/src/commands/api/unpublish.js +5 -13
- package/src/commands/api/update.js +21 -41
- package/src/commands/domain/create.js +5 -4
- package/src/commands/domain/delete.js +63 -0
- package/src/commands/domain/publish.js +1 -1
- package/src/commands/domain/setdefault.js +30 -0
- package/src/commands/domain/unpublish.js +4 -12
- package/src/commands/domain/update.js +109 -0
- package/src/commands/project/api/add.js +48 -0
- package/src/commands/project/api/remove.js +69 -0
- package/src/commands/project/create.js +77 -0
- package/src/commands/project/delete.js +44 -0
- package/src/commands/project/domain/add.js +48 -0
- package/src/commands/project/domain/remove.js +69 -0
- package/src/commands/project/get.js +51 -0
- package/src/commands/project/list.js +62 -0
- package/src/commands/project/member/list.js +60 -0
- package/src/config/index.js +2 -1
- package/src/format-readme.js +38 -0
- package/src/help.js +1 -1
- package/src/requests/domain.js +4 -4
- package/src/requests/project.js +20 -0
- package/src/requests/spec.js +3 -2
- package/src/support/command/parse-input.js +14 -0
- package/src/support/command/update-command.js +21 -3
- package/src/template-strings/errors.js +1 -1
- package/src/template-strings/info.js +32 -3
- package/src/utils/oas.js +3 -3
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ The SwaggerHub CLI enables teams to build automation and workflows around Swagge
|
|
|
16
16
|
* [Contributing](#contributing)
|
|
17
17
|
<!-- tocstop -->
|
|
18
18
|
# Requirements
|
|
19
|
-
Node.js
|
|
19
|
+
Node.js 12 or later.
|
|
20
20
|
# Installation
|
|
21
21
|
```sh-session
|
|
22
22
|
$ npm i -g swaggerhub-cli
|
|
@@ -25,7 +25,7 @@ $ npm i -g swaggerhub-cli
|
|
|
25
25
|
The SwaggerHub CLI can be configured through environment variables or through the [`swaggerhub configure`](#swaggerhub-configure) command. The CLI will look for the following environment variables.
|
|
26
26
|
|
|
27
27
|
* `SWAGGERHUB_API_KEY` (required) – **Important: keep this key secure.** This is the SwaggerHub API key the CLI will use for authentication. You can find your API key on the [user settings page](https://app.swaggerhub.com/settings/apiKey) in SwaggerHub.
|
|
28
|
-
* `SWAGGERHUB_URL` (optional, default is `https://api.swaggerhub.com
|
|
28
|
+
* `SWAGGERHUB_URL` (optional, default is `https://api.swaggerhub.com`) – Customers with on-premise installations need to point this to their on-premise API, which is `http(s)://{swaggerhub-host}/v1` (do not append a backslash).
|
|
29
29
|
|
|
30
30
|
Alernatively, you can use the `swaggerhub configure` command to create a configuration file for the CLI to use. This command will walk you through the steps to set up the necessary configurations.
|
|
31
31
|
|
|
@@ -37,7 +37,7 @@ $ swaggerhub configure
|
|
|
37
37
|
|
|
38
38
|
Environment variables take precedence over the configuration file created by this command.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
# Additional configuration for SwaggerHub On-Premise
|
|
41
41
|
|
|
42
42
|
If your SwaggerHub On-Premise instance uses a **self-signed or privately signed SSL certificate**, there are additional steps required to make the SwaggerHub CLI trust this certificate.
|
|
43
43
|
|
|
@@ -102,6 +102,7 @@ USAGE
|
|
|
102
102
|
# Commands
|
|
103
103
|
<!-- commands -->
|
|
104
104
|
* [`swaggerhub api:create OWNER/API_NAME/[VERSION]`](#swaggerhub-apicreate)
|
|
105
|
+
* [`swaggerhub api:delete OWNER/API_NAME/[VERSION]`](#swaggerhub-apidelete)
|
|
105
106
|
* [`swaggerhub api:get OWNER/API_NAME/[VERSION]`](#swaggerhub-apiget)
|
|
106
107
|
* [`swaggerhub api:publish OWNER/API_NAME/VERSION`](#swaggerhub-apipublish)
|
|
107
108
|
* [`swaggerhub api:setdefault OWNER/API_NAME/VERSION`](#swaggerhub-apisetdefault)
|
|
@@ -110,10 +111,13 @@ USAGE
|
|
|
110
111
|
* [`swaggerhub api:validate OWNER/API_NAME/[VERSION]`](#swaggerhub-apivalidate)
|
|
111
112
|
* [`swaggerhub configure`](#swaggerhub-configure)
|
|
112
113
|
* [`swaggerhub domain:create OWNER/DOMAIN_NAME/[VERSION]`](#swaggerhub-domaincreate)
|
|
114
|
+
* [`swaggerhub domain:delete OWNER/DOMAIN_NAME/[VERSION]`](#swaggerhub-domaindelete)
|
|
113
115
|
* [`swaggerhub domain:get OWNER/DOMAIN_NAME/[VERSION]`](#swaggerhub-domainget)
|
|
114
116
|
* [`swaggerhub domain:publish OWNER/DOMAIN_NAME/VERSION`](#swaggerhub-domainpublish)
|
|
117
|
+
* [`swaggerhub domain:setdefault OWNER/DOMAIN_NAME/VERSION`](#swaggerhub-domainsetdefault)
|
|
115
118
|
* [`swaggerhub domain:unpublish OWNER/DOMAIN_NAME/VERSION`](#swaggerhub-domainunpublish)
|
|
116
|
-
* [`swaggerhub
|
|
119
|
+
* [`swaggerhub domain:update OWNER/DOMAIN_NAME/[VERSION]`](#swaggerhub-domainupdate)
|
|
120
|
+
* [`swaggerhub help [COMMAND]`](#swaggerhub-help)
|
|
117
121
|
* [`swaggerhub integration:create OWNER/API_NAME/[VERSION]`](#swaggerhub-integrationcreate)
|
|
118
122
|
* [`swaggerhub integration:delete OWNER/API_NAME/VERSION/INTEGRATION_ID`](#swaggerhub-integrationdelete)
|
|
119
123
|
* [`swaggerhub integration:execute OWNER/API_NAME/VERSION/INTEGRATION_ID`](#swaggerhub-integrationexecute)
|
|
@@ -121,10 +125,20 @@ USAGE
|
|
|
121
125
|
* [`swaggerhub integration:list OWNER/API_NAME/[VERSION]`](#swaggerhub-integrationlist)
|
|
122
126
|
* [`swaggerhub integration:update OWNER/API_NAME/VERSION/INTEGRATION_ID`](#swaggerhub-integrationupdate)
|
|
123
127
|
* [`swaggerhub plugins`](#swaggerhub-plugins)
|
|
124
|
-
* [`swaggerhub plugins:
|
|
125
|
-
* [`swaggerhub plugins:
|
|
126
|
-
* [`swaggerhub plugins:
|
|
128
|
+
* [`swaggerhub plugins:inspect PLUGIN...`](#swaggerhub-pluginsinspect)
|
|
129
|
+
* [`swaggerhub plugins:install PLUGIN...`](#swaggerhub-pluginsinstall)
|
|
130
|
+
* [`swaggerhub plugins:link PLUGIN`](#swaggerhub-pluginslink)
|
|
131
|
+
* [`swaggerhub plugins:uninstall PLUGIN...`](#swaggerhub-pluginsuninstall)
|
|
127
132
|
* [`swaggerhub plugins:update`](#swaggerhub-pluginsupdate)
|
|
133
|
+
* [`swaggerhub project:api:add OWNER/PROJECT_NAME API`](#swaggerhub-projectapiadd)
|
|
134
|
+
* [`swaggerhub project:api:remove OWNER/PROJECT_NAME API`](#swaggerhub-projectapiremove)
|
|
135
|
+
* [`swaggerhub project:create OWNER/PROJECT_NAME`](#swaggerhub-projectcreate)
|
|
136
|
+
* [`swaggerhub project:delete OWNER/PROJECT_NAME`](#swaggerhub-projectdelete)
|
|
137
|
+
* [`swaggerhub project:domain:add OWNER/PROJECT_NAME DOMAIN`](#swaggerhub-projectdomainadd)
|
|
138
|
+
* [`swaggerhub project:domain:remove OWNER/PROJECT_NAME DOMAIN`](#swaggerhub-projectdomainremove)
|
|
139
|
+
* [`swaggerhub project:get OWNER/PROJECT_NAME`](#swaggerhub-projectget)
|
|
140
|
+
* [`swaggerhub project:list [OWNER]`](#swaggerhub-projectlist)
|
|
141
|
+
* [`swaggerhub project:member:list OWNER/PROJECT_NAME`](#swaggerhub-projectmemberlist)
|
|
128
142
|
|
|
129
143
|
## `swaggerhub api:create`
|
|
130
144
|
|
|
@@ -138,11 +152,11 @@ ARGUMENTS
|
|
|
138
152
|
OWNER/API_NAME/[VERSION] API to create in SwaggerHub
|
|
139
153
|
|
|
140
154
|
OPTIONS
|
|
141
|
-
-f, --file=file
|
|
142
|
-
-h, --help
|
|
143
|
-
--publish
|
|
144
|
-
--setdefault
|
|
145
|
-
--visibility=public|private
|
|
155
|
+
-f, --file=file (required) file location of API to create
|
|
156
|
+
-h, --help show CLI help
|
|
157
|
+
--published=publish|unpublish [default: unpublish] sets the lifecycle setting of the API version
|
|
158
|
+
--setdefault sets API version to be the default
|
|
159
|
+
--visibility=public|private [default: private] visibility of API in SwaggerHub
|
|
146
160
|
|
|
147
161
|
DESCRIPTION
|
|
148
162
|
The API version from the file will be used unless the version is specified in the command argument.
|
|
@@ -151,12 +165,35 @@ DESCRIPTION
|
|
|
151
165
|
EXAMPLES
|
|
152
166
|
swaggerhub api:create organization/api/1.0.0 --file api.yaml --visibility public
|
|
153
167
|
swaggerhub api:create organization/api --file api.yaml
|
|
154
|
-
swaggerhub api:create organization/api/1.0.0 --publish --file api.json
|
|
168
|
+
swaggerhub api:create organization/api/1.0.0 --published=publish --file api.json
|
|
155
169
|
swaggerhub api:create organization/api/1.0.0 --setdefault --file api.json
|
|
156
|
-
swaggerhub api:create organization/api/1.0.0 --publish --setdefault --file api.json
|
|
170
|
+
swaggerhub api:create organization/api/1.0.0 --published=publish --setdefault --file api.json
|
|
157
171
|
```
|
|
158
172
|
|
|
159
|
-
_See code: [src/commands/api/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
173
|
+
_See code: [src/commands/api/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/api/create.js)_
|
|
174
|
+
|
|
175
|
+
## `swaggerhub api:delete`
|
|
176
|
+
|
|
177
|
+
delete an API or API version
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
USAGE
|
|
181
|
+
$ swaggerhub api:delete OWNER/API_NAME/[VERSION]
|
|
182
|
+
|
|
183
|
+
ARGUMENTS
|
|
184
|
+
OWNER/API_NAME/[VERSION] API to delete in SwaggerHub
|
|
185
|
+
|
|
186
|
+
OPTIONS
|
|
187
|
+
-f, --force delete API without prompting for confirmation
|
|
188
|
+
-h, --help show CLI help
|
|
189
|
+
|
|
190
|
+
EXAMPLES
|
|
191
|
+
swaggerhub api:delete organization/api/1.0.0
|
|
192
|
+
swaggerhub api:delete organization/api
|
|
193
|
+
swaggerhub api:delete organization/api --force
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
_See code: [src/commands/api/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/api/delete.js)_
|
|
160
197
|
|
|
161
198
|
## `swaggerhub api:get`
|
|
162
199
|
|
|
@@ -183,7 +220,7 @@ EXAMPLES
|
|
|
183
220
|
swaggerhub api:get organization/api/1.0.0 --json
|
|
184
221
|
```
|
|
185
222
|
|
|
186
|
-
_See code: [src/commands/api/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
223
|
+
_See code: [src/commands/api/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/api/get.js)_
|
|
187
224
|
|
|
188
225
|
## `swaggerhub api:publish`
|
|
189
226
|
|
|
@@ -203,7 +240,7 @@ EXAMPLE
|
|
|
203
240
|
swaggerhub api:publish organization/api/1.0.0
|
|
204
241
|
```
|
|
205
242
|
|
|
206
|
-
_See code: [src/commands/api/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
243
|
+
_See code: [src/commands/api/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/api/publish.js)_
|
|
207
244
|
|
|
208
245
|
## `swaggerhub api:setdefault`
|
|
209
246
|
|
|
@@ -223,7 +260,7 @@ EXAMPLE
|
|
|
223
260
|
swaggerhub api:setdefault organization/api/2.0.0
|
|
224
261
|
```
|
|
225
262
|
|
|
226
|
-
_See code: [src/commands/api/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
263
|
+
_See code: [src/commands/api/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/api/setdefault.js)_
|
|
227
264
|
|
|
228
265
|
## `swaggerhub api:unpublish`
|
|
229
266
|
|
|
@@ -243,7 +280,7 @@ EXAMPLE
|
|
|
243
280
|
swaggerhub api:unpublish organization/api/1.0.0
|
|
244
281
|
```
|
|
245
282
|
|
|
246
|
-
_See code: [src/commands/api/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
283
|
+
_See code: [src/commands/api/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/api/unpublish.js)_
|
|
247
284
|
|
|
248
285
|
## `swaggerhub api:update`
|
|
249
286
|
|
|
@@ -257,11 +294,11 @@ ARGUMENTS
|
|
|
257
294
|
OWNER/API_NAME/[VERSION] API to update in SwaggerHub
|
|
258
295
|
|
|
259
296
|
OPTIONS
|
|
260
|
-
-f, --file=file
|
|
261
|
-
-h, --help
|
|
262
|
-
--publish
|
|
263
|
-
--setdefault
|
|
264
|
-
--visibility=public|private
|
|
297
|
+
-f, --file=file file location of API to update
|
|
298
|
+
-h, --help show CLI help
|
|
299
|
+
--published=publish|unpublish sets the lifecycle setting of the API version
|
|
300
|
+
--setdefault sets API version to be the default
|
|
301
|
+
--visibility=public|private visibility of API in SwaggerHub
|
|
265
302
|
|
|
266
303
|
DESCRIPTION
|
|
267
304
|
The API version from the file will be used unless the version is specified in the command argument.
|
|
@@ -271,13 +308,13 @@ DESCRIPTION
|
|
|
271
308
|
EXAMPLES
|
|
272
309
|
swaggerhub api:update organization/api --file api.yaml
|
|
273
310
|
swaggerhub api:update organization/api/1.0.0 --file api.json
|
|
274
|
-
swaggerhub api:update organization/api/1.0.0 --publish --file api.json
|
|
311
|
+
swaggerhub api:update organization/api/1.0.0 --published=publish --file api.json
|
|
275
312
|
swaggerhub api:update organization/api/1.0.0 --setdefault --file api.json
|
|
276
|
-
swaggerhub api:update organization/api/1.0.0 --
|
|
313
|
+
swaggerhub api:update organization/api/1.0.0 --published=unpublish --setdefault --file api.json
|
|
277
314
|
swaggerhub api:update organization/api/1.0.0 --visibility=private
|
|
278
315
|
```
|
|
279
316
|
|
|
280
|
-
_See code: [src/commands/api/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
317
|
+
_See code: [src/commands/api/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/api/update.js)_
|
|
281
318
|
|
|
282
319
|
## `swaggerhub api:validate`
|
|
283
320
|
|
|
@@ -302,7 +339,7 @@ EXAMPLES
|
|
|
302
339
|
swaggerhub api:validate organization/api
|
|
303
340
|
```
|
|
304
341
|
|
|
305
|
-
_See code: [src/commands/api/validate.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
342
|
+
_See code: [src/commands/api/validate.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/api/validate.js)_
|
|
306
343
|
|
|
307
344
|
## `swaggerhub configure`
|
|
308
345
|
|
|
@@ -324,7 +361,7 @@ DESCRIPTION
|
|
|
324
361
|
settings.
|
|
325
362
|
```
|
|
326
363
|
|
|
327
|
-
_See code: [src/commands/configure.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
364
|
+
_See code: [src/commands/configure.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/configure.js)_
|
|
328
365
|
|
|
329
366
|
## `swaggerhub domain:create`
|
|
330
367
|
|
|
@@ -338,11 +375,11 @@ ARGUMENTS
|
|
|
338
375
|
OWNER/DOMAIN_NAME/[VERSION] Domain to create in SwaggerHub
|
|
339
376
|
|
|
340
377
|
OPTIONS
|
|
341
|
-
-f, --file=file
|
|
342
|
-
-h, --help
|
|
343
|
-
--publish
|
|
344
|
-
--setdefault
|
|
345
|
-
--visibility=public|private
|
|
378
|
+
-f, --file=file (required) file location of domain to create
|
|
379
|
+
-h, --help show CLI help
|
|
380
|
+
--published=publish|unpublish [default: unpublish] sets the lifecycle setting of the domain version
|
|
381
|
+
--setdefault sets domain version to be the default
|
|
382
|
+
--visibility=public|private [default: private] visibility of domain in SwaggerHub
|
|
346
383
|
|
|
347
384
|
DESCRIPTION
|
|
348
385
|
The domain version from the file will be used unless the version is specified in the command argument.
|
|
@@ -356,7 +393,30 @@ EXAMPLES
|
|
|
356
393
|
swaggerhub domain:create organization/domain/1.0.0 --publish --setdefault --file domain.json
|
|
357
394
|
```
|
|
358
395
|
|
|
359
|
-
_See code: [src/commands/domain/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
396
|
+
_See code: [src/commands/domain/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/domain/create.js)_
|
|
397
|
+
|
|
398
|
+
## `swaggerhub domain:delete`
|
|
399
|
+
|
|
400
|
+
delete a domain or domain version
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
USAGE
|
|
404
|
+
$ swaggerhub domain:delete OWNER/DOMAIN_NAME/[VERSION]
|
|
405
|
+
|
|
406
|
+
ARGUMENTS
|
|
407
|
+
OWNER/DOMAIN_NAME/[VERSION] Domain to delete in SwaggerHub
|
|
408
|
+
|
|
409
|
+
OPTIONS
|
|
410
|
+
-f, --force delete domain without prompting for confirmation
|
|
411
|
+
-h, --help show CLI help
|
|
412
|
+
|
|
413
|
+
EXAMPLES
|
|
414
|
+
swaggerhub domain:delete organization/domain/1.0.0
|
|
415
|
+
swaggerhub domain:delete organization/domain
|
|
416
|
+
swaggerhub domain:delete organization/domain --force
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
_See code: [src/commands/domain/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/domain/delete.js)_
|
|
360
420
|
|
|
361
421
|
## `swaggerhub domain:get`
|
|
362
422
|
|
|
@@ -382,7 +442,7 @@ EXAMPLES
|
|
|
382
442
|
swaggerhub domain:get organization/domain/1.0.0 --json
|
|
383
443
|
```
|
|
384
444
|
|
|
385
|
-
_See code: [src/commands/domain/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
445
|
+
_See code: [src/commands/domain/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/domain/get.js)_
|
|
386
446
|
|
|
387
447
|
## `swaggerhub domain:publish`
|
|
388
448
|
|
|
@@ -402,7 +462,27 @@ EXAMPLE
|
|
|
402
462
|
swaggerhub domain:publish organization/domain/1.0.0
|
|
403
463
|
```
|
|
404
464
|
|
|
405
|
-
_See code: [src/commands/domain/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
465
|
+
_See code: [src/commands/domain/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/domain/publish.js)_
|
|
466
|
+
|
|
467
|
+
## `swaggerhub domain:setdefault`
|
|
468
|
+
|
|
469
|
+
set the default version of a domain
|
|
470
|
+
|
|
471
|
+
```
|
|
472
|
+
USAGE
|
|
473
|
+
$ swaggerhub domain:setdefault OWNER/DOMAIN_NAME/VERSION
|
|
474
|
+
|
|
475
|
+
ARGUMENTS
|
|
476
|
+
OWNER/DOMAIN_NAME/VERSION domain identifier
|
|
477
|
+
|
|
478
|
+
OPTIONS
|
|
479
|
+
-h, --help show CLI help
|
|
480
|
+
|
|
481
|
+
EXAMPLE
|
|
482
|
+
swaggerhub domain:setdefault organization/domain/2.0.0
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
_See code: [src/commands/domain/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/domain/setdefault.js)_
|
|
406
486
|
|
|
407
487
|
## `swaggerhub domain:unpublish`
|
|
408
488
|
|
|
@@ -422,9 +502,43 @@ EXAMPLE
|
|
|
422
502
|
swaggerhub domain:unpublish organization/domain/1.0.0
|
|
423
503
|
```
|
|
424
504
|
|
|
425
|
-
_See code: [src/commands/domain/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
505
|
+
_See code: [src/commands/domain/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/domain/unpublish.js)_
|
|
506
|
+
|
|
507
|
+
## `swaggerhub domain:update`
|
|
508
|
+
|
|
509
|
+
update a domain
|
|
510
|
+
|
|
511
|
+
```
|
|
512
|
+
USAGE
|
|
513
|
+
$ swaggerhub domain:update OWNER/DOMAIN_NAME/[VERSION]
|
|
514
|
+
|
|
515
|
+
ARGUMENTS
|
|
516
|
+
OWNER/DOMAIN_NAME/[VERSION] domain to update in SwaggerHub
|
|
517
|
+
|
|
518
|
+
OPTIONS
|
|
519
|
+
-f, --file=file file location of domain to update
|
|
520
|
+
-h, --help show CLI help
|
|
521
|
+
--published=publish|unpublish sets the lifecycle setting of the domain version
|
|
522
|
+
--setdefault sets domain version to be the default
|
|
523
|
+
--visibility=public|private visibility of domain in SwaggerHub
|
|
524
|
+
|
|
525
|
+
DESCRIPTION
|
|
526
|
+
The domain version from the file will be used unless the version is specified in the command argument.
|
|
527
|
+
When no file is specified then the default domain version will be updated.
|
|
528
|
+
The domain visibility can be changed by using visibility flag.
|
|
529
|
+
|
|
530
|
+
EXAMPLES
|
|
531
|
+
swaggerhub domain:update organization/domain --file domain.yaml
|
|
532
|
+
swaggerhub domain:update organization/domain/1.0.0 --file domain.json
|
|
533
|
+
swaggerhub domain:update organization/domain/1.0.0 --published=publish --file domain.json
|
|
534
|
+
swaggerhub domain:update organization/domain/1.0.0 --setdefault --file domain.json
|
|
535
|
+
swaggerhub domain:update organization/domain/1.0.0 --published=unpublish --setdefault --file domain.json
|
|
536
|
+
swaggerhub domain:update organization/domain/1.0.0 --visibility=private
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
_See code: [src/commands/domain/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/domain/update.js)_
|
|
426
540
|
|
|
427
|
-
## `swaggerhub help
|
|
541
|
+
## `swaggerhub help`
|
|
428
542
|
|
|
429
543
|
display help for swaggerhub
|
|
430
544
|
|
|
@@ -439,7 +553,7 @@ OPTIONS
|
|
|
439
553
|
--all see all commands in CLI
|
|
440
554
|
```
|
|
441
555
|
|
|
442
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.
|
|
556
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.3.1/src/commands/help.ts)_
|
|
443
557
|
|
|
444
558
|
## `swaggerhub integration:create`
|
|
445
559
|
|
|
@@ -465,7 +579,7 @@ EXAMPLE
|
|
|
465
579
|
swaggerhub integration:create organization/api/1.0.0 --file config.json
|
|
466
580
|
```
|
|
467
581
|
|
|
468
|
-
_See code: [src/commands/integration/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
582
|
+
_See code: [src/commands/integration/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/integration/create.js)_
|
|
469
583
|
|
|
470
584
|
## `swaggerhub integration:delete`
|
|
471
585
|
|
|
@@ -485,7 +599,7 @@ EXAMPLE
|
|
|
485
599
|
swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
|
|
486
600
|
```
|
|
487
601
|
|
|
488
|
-
_See code: [src/commands/integration/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
602
|
+
_See code: [src/commands/integration/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/integration/delete.js)_
|
|
489
603
|
|
|
490
604
|
## `swaggerhub integration:execute`
|
|
491
605
|
|
|
@@ -505,7 +619,7 @@ EXAMPLE
|
|
|
505
619
|
swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
|
|
506
620
|
```
|
|
507
621
|
|
|
508
|
-
_See code: [src/commands/integration/execute.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
622
|
+
_See code: [src/commands/integration/execute.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/integration/execute.js)_
|
|
509
623
|
|
|
510
624
|
## `swaggerhub integration:get`
|
|
511
625
|
|
|
@@ -525,7 +639,7 @@ EXAMPLE
|
|
|
525
639
|
swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
|
|
526
640
|
```
|
|
527
641
|
|
|
528
|
-
_See code: [src/commands/integration/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
642
|
+
_See code: [src/commands/integration/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/integration/get.js)_
|
|
529
643
|
|
|
530
644
|
## `swaggerhub integration:list`
|
|
531
645
|
|
|
@@ -545,7 +659,7 @@ EXAMPLE
|
|
|
545
659
|
swaggerhub integration:list organization/api/1.0.0
|
|
546
660
|
```
|
|
547
661
|
|
|
548
|
-
_See code: [src/commands/integration/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
662
|
+
_See code: [src/commands/integration/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/integration/list.js)_
|
|
549
663
|
|
|
550
664
|
## `swaggerhub integration:update`
|
|
551
665
|
|
|
@@ -566,39 +680,60 @@ EXAMPLE
|
|
|
566
680
|
swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json
|
|
567
681
|
```
|
|
568
682
|
|
|
569
|
-
_See code: [src/commands/integration/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
683
|
+
_See code: [src/commands/integration/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/integration/update.js)_
|
|
570
684
|
|
|
571
685
|
## `swaggerhub plugins`
|
|
572
686
|
|
|
573
|
-
|
|
687
|
+
List installed plugins.
|
|
574
688
|
|
|
575
689
|
```
|
|
576
690
|
USAGE
|
|
577
691
|
$ swaggerhub plugins
|
|
578
692
|
|
|
579
693
|
OPTIONS
|
|
580
|
-
--core
|
|
694
|
+
--core Show core plugins.
|
|
581
695
|
|
|
582
696
|
EXAMPLE
|
|
583
697
|
$ swaggerhub plugins
|
|
584
698
|
```
|
|
585
699
|
|
|
586
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
700
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.0.11/src/commands/plugins/index.ts)_
|
|
587
701
|
|
|
588
|
-
## `swaggerhub plugins:
|
|
702
|
+
## `swaggerhub plugins:inspect`
|
|
589
703
|
|
|
590
|
-
|
|
704
|
+
Displays installation properties of a plugin.
|
|
705
|
+
|
|
706
|
+
```
|
|
707
|
+
USAGE
|
|
708
|
+
$ swaggerhub plugins:inspect PLUGIN...
|
|
709
|
+
|
|
710
|
+
ARGUMENTS
|
|
711
|
+
PLUGIN [default: .] Plugin to inspect.
|
|
712
|
+
|
|
713
|
+
OPTIONS
|
|
714
|
+
-h, --help Show CLI help.
|
|
715
|
+
-v, --verbose
|
|
716
|
+
|
|
717
|
+
EXAMPLE
|
|
718
|
+
$ swaggerhub plugins:inspect myplugin
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.0.11/src/commands/plugins/inspect.ts)_
|
|
722
|
+
|
|
723
|
+
## `swaggerhub plugins:install`
|
|
724
|
+
|
|
725
|
+
Installs a plugin into the CLI.
|
|
591
726
|
|
|
592
727
|
```
|
|
593
728
|
USAGE
|
|
594
729
|
$ swaggerhub plugins:install PLUGIN...
|
|
595
730
|
|
|
596
731
|
ARGUMENTS
|
|
597
|
-
PLUGIN
|
|
732
|
+
PLUGIN Plugin to install.
|
|
598
733
|
|
|
599
734
|
OPTIONS
|
|
600
|
-
-f, --force yarn install with force flag
|
|
601
|
-
-h, --help
|
|
735
|
+
-f, --force Run yarn install with force flag.
|
|
736
|
+
-h, --help Show CLI help.
|
|
602
737
|
-v, --verbose
|
|
603
738
|
|
|
604
739
|
DESCRIPTION
|
|
@@ -619,11 +754,11 @@ EXAMPLES
|
|
|
619
754
|
$ swaggerhub plugins:install someuser/someplugin
|
|
620
755
|
```
|
|
621
756
|
|
|
622
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
757
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.0.11/src/commands/plugins/install.ts)_
|
|
623
758
|
|
|
624
|
-
## `swaggerhub plugins:link
|
|
759
|
+
## `swaggerhub plugins:link`
|
|
625
760
|
|
|
626
|
-
|
|
761
|
+
Links a plugin into the CLI for development.
|
|
627
762
|
|
|
628
763
|
```
|
|
629
764
|
USAGE
|
|
@@ -633,24 +768,24 @@ ARGUMENTS
|
|
|
633
768
|
PATH [default: .] path to plugin
|
|
634
769
|
|
|
635
770
|
OPTIONS
|
|
636
|
-
-h, --help
|
|
771
|
+
-h, --help Show CLI help.
|
|
637
772
|
-v, --verbose
|
|
638
773
|
|
|
639
774
|
DESCRIPTION
|
|
640
775
|
Installation of a linked plugin will override a user-installed or core plugin.
|
|
641
776
|
|
|
642
|
-
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
|
643
|
-
|
|
777
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
|
778
|
+
command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
644
779
|
|
|
645
780
|
EXAMPLE
|
|
646
781
|
$ swaggerhub plugins:link myplugin
|
|
647
782
|
```
|
|
648
783
|
|
|
649
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
784
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.0.11/src/commands/plugins/link.ts)_
|
|
650
785
|
|
|
651
|
-
## `swaggerhub plugins:uninstall
|
|
786
|
+
## `swaggerhub plugins:uninstall`
|
|
652
787
|
|
|
653
|
-
|
|
788
|
+
Removes a plugin from the CLI.
|
|
654
789
|
|
|
655
790
|
```
|
|
656
791
|
USAGE
|
|
@@ -660,7 +795,7 @@ ARGUMENTS
|
|
|
660
795
|
PLUGIN plugin to uninstall
|
|
661
796
|
|
|
662
797
|
OPTIONS
|
|
663
|
-
-h, --help
|
|
798
|
+
-h, --help Show CLI help.
|
|
664
799
|
-v, --verbose
|
|
665
800
|
|
|
666
801
|
ALIASES
|
|
@@ -668,22 +803,215 @@ ALIASES
|
|
|
668
803
|
$ swaggerhub plugins:remove
|
|
669
804
|
```
|
|
670
805
|
|
|
671
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
806
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.0.11/src/commands/plugins/uninstall.ts)_
|
|
672
807
|
|
|
673
808
|
## `swaggerhub plugins:update`
|
|
674
809
|
|
|
675
|
-
|
|
810
|
+
Update installed plugins.
|
|
676
811
|
|
|
677
812
|
```
|
|
678
813
|
USAGE
|
|
679
814
|
$ swaggerhub plugins:update
|
|
680
815
|
|
|
681
816
|
OPTIONS
|
|
682
|
-
-h, --help
|
|
817
|
+
-h, --help Show CLI help.
|
|
683
818
|
-v, --verbose
|
|
684
819
|
```
|
|
685
820
|
|
|
686
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
821
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.0.11/src/commands/plugins/update.ts)_
|
|
822
|
+
|
|
823
|
+
## `swaggerhub project:api:add`
|
|
824
|
+
|
|
825
|
+
Adds an API to an existing project.
|
|
826
|
+
|
|
827
|
+
```
|
|
828
|
+
USAGE
|
|
829
|
+
$ swaggerhub project:api:add OWNER/PROJECT_NAME API
|
|
830
|
+
|
|
831
|
+
ARGUMENTS
|
|
832
|
+
OWNER/PROJECT_NAME The project to add the API to
|
|
833
|
+
API The name of the API to add
|
|
834
|
+
|
|
835
|
+
OPTIONS
|
|
836
|
+
-h, --help show CLI help
|
|
837
|
+
|
|
838
|
+
EXAMPLE
|
|
839
|
+
swaggerhub project:api:add organization/project_name my_api
|
|
840
|
+
```
|
|
841
|
+
|
|
842
|
+
_See code: [src/commands/project/api/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/api/add.js)_
|
|
843
|
+
|
|
844
|
+
## `swaggerhub project:api:remove`
|
|
845
|
+
|
|
846
|
+
Removes an API from a project in SwaggerHub.
|
|
847
|
+
|
|
848
|
+
```
|
|
849
|
+
USAGE
|
|
850
|
+
$ swaggerhub project:api:remove OWNER/PROJECT_NAME API
|
|
851
|
+
|
|
852
|
+
ARGUMENTS
|
|
853
|
+
OWNER/PROJECT_NAME The project remove the API from
|
|
854
|
+
API The API to remove
|
|
855
|
+
|
|
856
|
+
OPTIONS
|
|
857
|
+
-h, --help show CLI help
|
|
858
|
+
|
|
859
|
+
EXAMPLE
|
|
860
|
+
swaggerhub project:api:remove organization/project_name my_api
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
_See code: [src/commands/project/api/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/api/remove.js)_
|
|
864
|
+
|
|
865
|
+
## `swaggerhub project:create`
|
|
866
|
+
|
|
867
|
+
Creates a new project in SwaggerHub.
|
|
868
|
+
|
|
869
|
+
```
|
|
870
|
+
USAGE
|
|
871
|
+
$ swaggerhub project:create OWNER/PROJECT_NAME
|
|
872
|
+
|
|
873
|
+
ARGUMENTS
|
|
874
|
+
OWNER/PROJECT_NAME The new project to create
|
|
875
|
+
|
|
876
|
+
OPTIONS
|
|
877
|
+
-a, --apis=apis Comma separated list of api names to include in project
|
|
878
|
+
-d, --domains=domains Comma separated list of domain names to include in project
|
|
879
|
+
-h, --help show CLI help
|
|
880
|
+
--description=description Description of project
|
|
881
|
+
|
|
882
|
+
EXAMPLES
|
|
883
|
+
swaggerhub project:create organization/new_project_name --description "project description"
|
|
884
|
+
swaggerhub project:create organization/new_project_name -a "testapi1,testapi2"
|
|
885
|
+
swaggerhub project:create organization/new_project_name --apis "testapi1,testapi2"
|
|
886
|
+
swaggerhub project:create organization/new_project_name -d "testdomain3,testdomain4"
|
|
887
|
+
swaggerhub project:create organization/new_project_name --domains "testdomain3,testdomain4"
|
|
888
|
+
swaggerhub project:create organization/new_project_name -a "testapi1" -d "testdomain3" --description "description"
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
_See code: [src/commands/project/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/create.js)_
|
|
892
|
+
|
|
893
|
+
## `swaggerhub project:delete`
|
|
894
|
+
|
|
895
|
+
Deletes a project from SwaggerHub.
|
|
896
|
+
|
|
897
|
+
```
|
|
898
|
+
USAGE
|
|
899
|
+
$ swaggerhub project:delete OWNER/PROJECT_NAME
|
|
900
|
+
|
|
901
|
+
ARGUMENTS
|
|
902
|
+
OWNER/PROJECT_NAME Project to delete
|
|
903
|
+
|
|
904
|
+
OPTIONS
|
|
905
|
+
-h, --help show CLI help
|
|
906
|
+
|
|
907
|
+
EXAMPLE
|
|
908
|
+
swaggerhub project:delete organization/project_name
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
_See code: [src/commands/project/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/delete.js)_
|
|
912
|
+
|
|
913
|
+
## `swaggerhub project:domain:add`
|
|
914
|
+
|
|
915
|
+
Adds a domain to an existing project.
|
|
916
|
+
|
|
917
|
+
```
|
|
918
|
+
USAGE
|
|
919
|
+
$ swaggerhub project:domain:add OWNER/PROJECT_NAME DOMAIN
|
|
920
|
+
|
|
921
|
+
ARGUMENTS
|
|
922
|
+
OWNER/PROJECT_NAME The project to add the domain to
|
|
923
|
+
DOMAIN The name of the domain to add
|
|
924
|
+
|
|
925
|
+
OPTIONS
|
|
926
|
+
-h, --help show CLI help
|
|
927
|
+
|
|
928
|
+
EXAMPLE
|
|
929
|
+
swaggerhub project:domain:add organization/project_name my_domain
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
_See code: [src/commands/project/domain/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/domain/add.js)_
|
|
933
|
+
|
|
934
|
+
## `swaggerhub project:domain:remove`
|
|
935
|
+
|
|
936
|
+
Removes a domain from a project in SwaggerHub.
|
|
937
|
+
|
|
938
|
+
```
|
|
939
|
+
USAGE
|
|
940
|
+
$ swaggerhub project:domain:remove OWNER/PROJECT_NAME DOMAIN
|
|
941
|
+
|
|
942
|
+
ARGUMENTS
|
|
943
|
+
OWNER/PROJECT_NAME The project remove the domain from
|
|
944
|
+
DOMAIN The domain to remove
|
|
945
|
+
|
|
946
|
+
OPTIONS
|
|
947
|
+
-h, --help show CLI help
|
|
948
|
+
|
|
949
|
+
EXAMPLE
|
|
950
|
+
swaggerhub project:domain:remove organization/project_name my_domain
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
_See code: [src/commands/project/domain/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/domain/remove.js)_
|
|
954
|
+
|
|
955
|
+
## `swaggerhub project:get`
|
|
956
|
+
|
|
957
|
+
Retrieves the details for a project.
|
|
958
|
+
|
|
959
|
+
```
|
|
960
|
+
USAGE
|
|
961
|
+
$ swaggerhub project:get OWNER/PROJECT_NAME
|
|
962
|
+
|
|
963
|
+
ARGUMENTS
|
|
964
|
+
OWNER/PROJECT_NAME Project to retrieve the details for
|
|
965
|
+
|
|
966
|
+
OPTIONS
|
|
967
|
+
-h, --help show CLI help
|
|
968
|
+
|
|
969
|
+
EXAMPLE
|
|
970
|
+
swaggerhub project:get organization/project_name
|
|
971
|
+
```
|
|
972
|
+
|
|
973
|
+
_See code: [src/commands/project/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/get.js)_
|
|
974
|
+
|
|
975
|
+
## `swaggerhub project:list`
|
|
976
|
+
|
|
977
|
+
list projects
|
|
978
|
+
|
|
979
|
+
```
|
|
980
|
+
USAGE
|
|
981
|
+
$ swaggerhub project:list [OWNER]
|
|
982
|
+
|
|
983
|
+
ARGUMENTS
|
|
984
|
+
OWNER Organization to list projects for
|
|
985
|
+
|
|
986
|
+
OPTIONS
|
|
987
|
+
-h, --help show CLI help
|
|
988
|
+
|
|
989
|
+
EXAMPLES
|
|
990
|
+
swaggerhub project:list
|
|
991
|
+
swaggerhub project:list organization
|
|
992
|
+
```
|
|
993
|
+
|
|
994
|
+
_See code: [src/commands/project/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/list.js)_
|
|
995
|
+
|
|
996
|
+
## `swaggerhub project:member:list`
|
|
997
|
+
|
|
998
|
+
list members of a project
|
|
999
|
+
|
|
1000
|
+
```
|
|
1001
|
+
USAGE
|
|
1002
|
+
$ swaggerhub project:member:list OWNER/PROJECT_NAME
|
|
1003
|
+
|
|
1004
|
+
ARGUMENTS
|
|
1005
|
+
OWNER/PROJECT_NAME Project to list members of
|
|
1006
|
+
|
|
1007
|
+
OPTIONS
|
|
1008
|
+
-h, --help show CLI help
|
|
1009
|
+
|
|
1010
|
+
EXAMPLE
|
|
1011
|
+
swaggerhub project:member:list organisation/project_name
|
|
1012
|
+
```
|
|
1013
|
+
|
|
1014
|
+
_See code: [src/commands/project/member/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.1/src/commands/project/member/list.js)_
|
|
687
1015
|
<!-- commandsstop -->
|
|
688
1016
|
|
|
689
1017
|
# Plugins
|