swaggerhub-cli 0.12.1 → 0.14.0
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 +239 -126
- package/oclif.manifest.json +372 -175
- package/package.json +8 -5
- package/src/commands/api/clone.js +65 -0
- package/src/commands/api/create.js +2 -2
- package/src/commands/api/delete.js +1 -1
- package/src/commands/api/get.js +2 -2
- package/src/commands/api/publish.js +1 -1
- package/src/commands/api/setdefault.js +1 -1
- package/src/commands/api/update.js +3 -3
- package/src/commands/api/validate/download-rules.js +5 -5
- package/src/commands/api/validate/index.js +2 -2
- package/src/commands/api/validate/local.js +3 -3
- package/src/commands/configure.js +2 -2
- package/src/commands/domain/clone.js +65 -0
- package/src/commands/domain/create.js +6 -6
- package/src/commands/domain/delete.js +1 -1
- package/src/commands/domain/get.js +1 -1
- package/src/commands/domain/publish.js +13 -6
- package/src/commands/domain/rename.js +77 -0
- package/src/commands/domain/setdefault.js +1 -1
- package/src/commands/domain/unpublish.js +1 -1
- package/src/commands/domain/update.js +3 -3
- package/src/commands/integration/create.js +2 -2
- package/src/commands/integration/delete.js +1 -1
- package/src/commands/integration/execute.js +1 -1
- package/src/commands/integration/get.js +2 -2
- package/src/commands/integration/list.js +1 -1
- package/src/commands/integration/update.js +1 -1
- package/src/commands/project/api/add.js +2 -2
- package/src/commands/project/api/remove.js +3 -3
- package/src/commands/project/create.js +4 -4
- package/src/commands/project/delete.js +2 -2
- package/src/commands/project/domain/add.js +2 -2
- package/src/commands/project/domain/remove.js +3 -3
- package/src/commands/project/get.js +1 -1
- package/src/commands/project/list.js +27 -8
- package/src/commands/project/member/list.js +2 -2
- package/src/commands/spectral/download.js +1 -1
- package/src/commands/spectral/upload.js +1 -1
- package/src/support/command/base-command.js +1 -1
- package/src/support/command/update-command.js +20 -4
- package/src/support/http/index.js +2 -1
- package/src/support/http/proxy-agent.js +25 -0
- package/src/support/inquirer/prompt-templates.js +1 -1
- package/src/support/isOnPrem.js +2 -2
- package/src/template-strings/errors.js +4 -4
- package/src/template-strings/info.js +8 -2
package/README.md
CHANGED
|
@@ -1,46 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
Swagger CLI
|
|
2
2
|
==============
|
|
3
3
|
|
|
4
4
|
[](https://www.npmjs.com/package/swaggerhub-cli)
|
|
5
5
|
|
|
6
|
-
The
|
|
6
|
+
The Swagger CLI enables teams to build automation and workflows around Swagger. Teams can use it in places like their CI/CD pipeline to create new APIs, create and update API versions, and mark API versions as published and default among other features. Every team has their own workflow, and the Swagger CLI can help teams build the workflow that fits their needs.
|
|
7
7
|
|
|
8
8
|
<!-- toc -->
|
|
9
9
|
* [Requirements](#requirements)
|
|
10
10
|
* [Installation](#installation)
|
|
11
11
|
* [Setup](#setup)
|
|
12
|
-
* [
|
|
12
|
+
* [Using a proxy](#using-a-proxy)
|
|
13
|
+
* [Additional configuration for Swagger Studio On-Premise](#additional-configuration-for-swagger-studio-on-premise)
|
|
13
14
|
* [Usage](#usage)
|
|
14
15
|
* [Commands](#commands)
|
|
15
16
|
* [Plugins](#plugins)
|
|
16
17
|
* [Contributing](#contributing)
|
|
17
18
|
<!-- tocstop -->
|
|
18
19
|
# Requirements
|
|
19
|
-
Node.js
|
|
20
|
+
* Node.js 22.9 or later.
|
|
21
|
+
* Swagger SaaS, or Swagger Studio On-Premise 2.x. On-Premise 1.x is not supported.
|
|
20
22
|
|
|
21
23
|
# Installation
|
|
22
24
|
```sh-session
|
|
23
25
|
$ npm i -g swaggerhub-cli
|
|
24
26
|
```
|
|
25
27
|
# Setup
|
|
26
|
-
The
|
|
28
|
+
The Swagger CLI can be configured through environment variables or through the [`swaggerhub configure`](#swaggerhub-configure) command. The CLI will look for the following environment variables.
|
|
27
29
|
|
|
28
|
-
* `SWAGGERHUB_API_KEY` (required) – **Important: keep this key secure.** This is the
|
|
29
|
-
* `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
|
|
30
|
+
* `SWAGGERHUB_API_KEY` (required) – **Important: keep this key secure.** This is the Swagger 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 Swagger.
|
|
31
|
+
* `SWAGGERHUB_URL` (optional, default is `https://api.swaggerhub.com`) – Customers with on-premise installations (version 2.x) need to point this to their on-premise API, which is `http(s)://{swaggerhub-host}/v1` (do not append a trailing slash).
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
Alternatively, 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.
|
|
32
34
|
|
|
33
35
|
```sh-session
|
|
34
36
|
$ swaggerhub configure
|
|
35
|
-
?
|
|
37
|
+
? Swagger URL: https://api.swaggerhub.com
|
|
36
38
|
? API Key: <your-api-key>
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
Environment variables take precedence over the configuration file created by this command.
|
|
40
42
|
|
|
41
|
-
#
|
|
43
|
+
# Using a proxy
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
The CLI honors the standard proxy environment variables (lowercase variants also work):
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
export HTTPS_PROXY=http://proxy.example.com:8080 # used for https:// URLs, including the default https://api.swaggerhub.com
|
|
49
|
+
export HTTP_PROXY=http://proxy.example.com:8080 # used for http:// URLs, e.g. an on-premise instance served over HTTP
|
|
50
|
+
export NO_PROXY=localhost,.internal.example.com # hosts that should bypass the proxy
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Proxy credentials can be included in the URL: `http://user:password@proxy.example.com:8080`. Always include the scheme (`http://` or `https://`) in the proxy URL.
|
|
54
|
+
|
|
55
|
+
HTTPS requests are tunnelled through the proxy using `CONNECT`. If your proxy intercepts TLS, see `NODE_EXTRA_CA_CERTS` below. SOCKS proxies are not supported.
|
|
56
|
+
|
|
57
|
+
# Additional configuration for Swagger Studio On-Premise
|
|
58
|
+
|
|
59
|
+
If your Swagger Studio On-Premise instance uses a **self-signed or privately signed SSL certificate**, there are additional steps required to make the Swagger CLI trust this certificate.
|
|
44
60
|
|
|
45
61
|
By default, Node.js rejects self-signed or privately signed SSL certificates because their root CA is not known. You will see an error like this in the CLI output:
|
|
46
62
|
|
|
@@ -93,8 +109,8 @@ set NODE_EXTRA_CA_CERTS=%USERPROFILE%\extra-ca-certs.pem
|
|
|
93
109
|
```sh-session
|
|
94
110
|
$ swaggerhub COMMAND
|
|
95
111
|
running command...
|
|
96
|
-
$ swaggerhub
|
|
97
|
-
swaggerhub/0.
|
|
112
|
+
$ swaggerhub --version
|
|
113
|
+
swaggerhub-cli/0.13.0 linux-x64 node-v22.9.0
|
|
98
114
|
$ swaggerhub --help [COMMAND]
|
|
99
115
|
USAGE
|
|
100
116
|
$ swaggerhub COMMAND
|
|
@@ -102,6 +118,7 @@ USAGE
|
|
|
102
118
|
```
|
|
103
119
|
# Commands
|
|
104
120
|
<!-- commands -->
|
|
121
|
+
* [`swaggerhub api:clone OWNER/API_NAME/VERSION NEW_VERSION`](#swaggerhub-apiclone)
|
|
105
122
|
* [`swaggerhub api:create OWNER/API_NAME/[VERSION]`](#swaggerhub-apicreate)
|
|
106
123
|
* [`swaggerhub api:delete OWNER/API_NAME/[VERSION]`](#swaggerhub-apidelete)
|
|
107
124
|
* [`swaggerhub api:get OWNER/API_NAME/[VERSION]`](#swaggerhub-apiget)
|
|
@@ -114,10 +131,12 @@ USAGE
|
|
|
114
131
|
* [`swaggerhub api:validate:download-rules OWNER`](#swaggerhub-apivalidatedownload)
|
|
115
132
|
* [`swaggerhub api:validate:local`](#swaggerhub-apivalidatelocal)
|
|
116
133
|
* [`swaggerhub configure`](#swaggerhub-configure)
|
|
134
|
+
* [`swaggerhub domain:clone OWNER/DOMAIN_NAME/VERSION NEW_VERSION`](#swaggerhub-domainclone)
|
|
117
135
|
* [`swaggerhub domain:create OWNER/DOMAIN_NAME/[VERSION]`](#swaggerhub-domaincreate)
|
|
118
136
|
* [`swaggerhub domain:delete OWNER/DOMAIN_NAME/[VERSION]`](#swaggerhub-domaindelete)
|
|
119
137
|
* [`swaggerhub domain:get OWNER/DOMAIN_NAME/[VERSION]`](#swaggerhub-domainget)
|
|
120
138
|
* [`swaggerhub domain:publish OWNER/DOMAIN_NAME/VERSION`](#swaggerhub-domainpublish)
|
|
139
|
+
* [`swaggerhub domain:rename OWNER/DOMAIN_NAME DOMAIN_NEW_NAME`](#swaggerhub-domainrename)
|
|
121
140
|
* [`swaggerhub domain:setdefault OWNER/DOMAIN_NAME/VERSION`](#swaggerhub-domainsetdefault)
|
|
122
141
|
* [`swaggerhub domain:unpublish OWNER/DOMAIN_NAME/VERSION`](#swaggerhub-domainunpublish)
|
|
123
142
|
* [`swaggerhub domain:update OWNER/DOMAIN_NAME/[VERSION]`](#swaggerhub-domainupdate)
|
|
@@ -150,6 +169,34 @@ USAGE
|
|
|
150
169
|
* [`swaggerhub spectral:download OWNER/RULESET_NAME DIRECTORY`](#swaggerhub-spectraldownload)
|
|
151
170
|
* [`swaggerhub spectral:upload OWNER/RULESET_NAME DIRECTORY`](#swaggerhub-spectralupload)
|
|
152
171
|
|
|
172
|
+
## `swaggerhub api:clone`
|
|
173
|
+
|
|
174
|
+
clone an API version as a new version
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
USAGE
|
|
178
|
+
$ swaggerhub api:clone OWNER/API_NAME/VERSION NEW_VERSION [--visibility public|private] [-h]
|
|
179
|
+
|
|
180
|
+
ARGUMENTS
|
|
181
|
+
OWNER/API_NAME/VERSION API version to clone
|
|
182
|
+
NEW_VERSION Version identifier of the new API version
|
|
183
|
+
|
|
184
|
+
FLAGS
|
|
185
|
+
-h, --help Show CLI help.
|
|
186
|
+
--visibility=<option> visibility of the new version (defaults to the server setting)
|
|
187
|
+
<options: public|private>
|
|
188
|
+
|
|
189
|
+
DESCRIPTION
|
|
190
|
+
clone an API version as a new version
|
|
191
|
+
|
|
192
|
+
EXAMPLES
|
|
193
|
+
$ swaggerhub api:clone organization/api/1.0.0 1.0.1
|
|
194
|
+
|
|
195
|
+
$ swaggerhub api:clone organization/api/1.0.0 1.0.1 --visibility public
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
_See code: [src/commands/api/clone.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/clone.js)_
|
|
199
|
+
|
|
153
200
|
## `swaggerhub api:create`
|
|
154
201
|
|
|
155
202
|
creates a new API / API version from a YAML/JSON file
|
|
@@ -160,7 +207,7 @@ USAGE
|
|
|
160
207
|
-f <value>) [--setdefault ] [-h]
|
|
161
208
|
|
|
162
209
|
ARGUMENTS
|
|
163
|
-
OWNER/API_NAME/[VERSION] API to create on
|
|
210
|
+
OWNER/API_NAME/[VERSION] API to create on Swagger
|
|
164
211
|
|
|
165
212
|
FLAGS
|
|
166
213
|
-f, --file=<value> (required) file location of API to create
|
|
@@ -168,7 +215,7 @@ FLAGS
|
|
|
168
215
|
--published=<option> [default: unpublish] sets the lifecycle setting of the API version
|
|
169
216
|
<options: publish|unpublish>
|
|
170
217
|
--setdefault sets API version to be the default
|
|
171
|
-
--visibility=<option> [default: private] visibility of API in
|
|
218
|
+
--visibility=<option> [default: private] visibility of API in Swagger
|
|
172
219
|
<options: public|private>
|
|
173
220
|
|
|
174
221
|
DESCRIPTION
|
|
@@ -189,7 +236,7 @@ EXAMPLES
|
|
|
189
236
|
$ swaggerhub api:create organization/api/1.0.0 --published=publish --setdefault --file api.json
|
|
190
237
|
```
|
|
191
238
|
|
|
192
|
-
_See code: [src/commands/api/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
239
|
+
_See code: [src/commands/api/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/create.js)_
|
|
193
240
|
|
|
194
241
|
## `swaggerhub api:delete`
|
|
195
242
|
|
|
@@ -200,7 +247,7 @@ USAGE
|
|
|
200
247
|
$ swaggerhub api:delete OWNER/API_NAME/[VERSION] [-f] [-h]
|
|
201
248
|
|
|
202
249
|
ARGUMENTS
|
|
203
|
-
OWNER/API_NAME/[VERSION] API to delete on
|
|
250
|
+
OWNER/API_NAME/[VERSION] API to delete on Swagger
|
|
204
251
|
|
|
205
252
|
FLAGS
|
|
206
253
|
-f, --force delete API without prompting for confirmation
|
|
@@ -218,7 +265,7 @@ EXAMPLES
|
|
|
218
265
|
$ swaggerhub api:delete organization/api --force
|
|
219
266
|
```
|
|
220
267
|
|
|
221
|
-
_See code: [src/commands/api/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
268
|
+
_See code: [src/commands/api/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/delete.js)_
|
|
222
269
|
|
|
223
270
|
## `swaggerhub api:get`
|
|
224
271
|
|
|
@@ -229,12 +276,12 @@ USAGE
|
|
|
229
276
|
$ swaggerhub api:get OWNER/API_NAME/[VERSION] [-j] [-r] [-h]
|
|
230
277
|
|
|
231
278
|
ARGUMENTS
|
|
232
|
-
OWNER/API_NAME/[VERSION] API to fetch from
|
|
279
|
+
OWNER/API_NAME/[VERSION] API to fetch from Swagger
|
|
233
280
|
|
|
234
281
|
FLAGS
|
|
235
282
|
-h, --help Show CLI help.
|
|
236
283
|
-j, --json returns the API in JSON format.
|
|
237
|
-
-r, --resolved gets the resolved API definition
|
|
284
|
+
-r, --resolved gets the resolved API definition
|
|
238
285
|
|
|
239
286
|
DESCRIPTION
|
|
240
287
|
fetches an API definition
|
|
@@ -248,7 +295,7 @@ EXAMPLES
|
|
|
248
295
|
$ swaggerhub api:get organization/api/1.0.0 --json
|
|
249
296
|
```
|
|
250
297
|
|
|
251
|
-
_See code: [src/commands/api/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
298
|
+
_See code: [src/commands/api/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/get.js)_
|
|
252
299
|
|
|
253
300
|
## `swaggerhub api:publish`
|
|
254
301
|
|
|
@@ -259,7 +306,7 @@ USAGE
|
|
|
259
306
|
$ swaggerhub api:publish OWNER/API_NAME/VERSION [-f] [-h]
|
|
260
307
|
|
|
261
308
|
ARGUMENTS
|
|
262
|
-
OWNER/API_NAME/VERSION API to publish on
|
|
309
|
+
OWNER/API_NAME/VERSION API to publish on Swagger
|
|
263
310
|
|
|
264
311
|
FLAGS
|
|
265
312
|
-f, --force publish API without prompting for confirmation
|
|
@@ -274,7 +321,7 @@ EXAMPLES
|
|
|
274
321
|
$ swaggerhub api:publish organization/api/1.0.0 --force
|
|
275
322
|
```
|
|
276
323
|
|
|
277
|
-
_See code: [src/commands/api/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
324
|
+
_See code: [src/commands/api/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/publish.js)_
|
|
278
325
|
|
|
279
326
|
## `swaggerhub api:rename`
|
|
280
327
|
|
|
@@ -298,7 +345,7 @@ EXAMPLES
|
|
|
298
345
|
$ swaggerhub api:rename organization/apiOldName apiNewName
|
|
299
346
|
```
|
|
300
347
|
|
|
301
|
-
_See code: [src/commands/api/rename.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
348
|
+
_See code: [src/commands/api/rename.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/rename.js)_
|
|
302
349
|
|
|
303
350
|
## `swaggerhub api:setdefault`
|
|
304
351
|
|
|
@@ -309,7 +356,7 @@ USAGE
|
|
|
309
356
|
$ swaggerhub api:setdefault OWNER/API_NAME/VERSION [-h]
|
|
310
357
|
|
|
311
358
|
ARGUMENTS
|
|
312
|
-
OWNER/API_NAME/VERSION API to set as default on
|
|
359
|
+
OWNER/API_NAME/VERSION API to set as default on Swagger
|
|
313
360
|
|
|
314
361
|
FLAGS
|
|
315
362
|
-h, --help Show CLI help.
|
|
@@ -321,7 +368,7 @@ EXAMPLES
|
|
|
321
368
|
$ swaggerhub api:setdefault organization/api/2.0.0
|
|
322
369
|
```
|
|
323
370
|
|
|
324
|
-
_See code: [src/commands/api/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
371
|
+
_See code: [src/commands/api/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/setdefault.js)_
|
|
325
372
|
|
|
326
373
|
## `swaggerhub api:unpublish`
|
|
327
374
|
|
|
@@ -344,7 +391,7 @@ EXAMPLES
|
|
|
344
391
|
$ swaggerhub api:unpublish organization/api/1.0.0
|
|
345
392
|
```
|
|
346
393
|
|
|
347
|
-
_See code: [src/commands/api/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
394
|
+
_See code: [src/commands/api/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/unpublish.js)_
|
|
348
395
|
|
|
349
396
|
## `swaggerhub api:update`
|
|
350
397
|
|
|
@@ -356,7 +403,7 @@ USAGE
|
|
|
356
403
|
publish|unpublish] [--setdefault] [-h]
|
|
357
404
|
|
|
358
405
|
ARGUMENTS
|
|
359
|
-
OWNER/API_NAME/[VERSION] API to update on
|
|
406
|
+
OWNER/API_NAME/[VERSION] API to update on Swagger
|
|
360
407
|
|
|
361
408
|
FLAGS
|
|
362
409
|
-f, --file=<value> file location of API to update
|
|
@@ -364,14 +411,14 @@ FLAGS
|
|
|
364
411
|
--published=<option> sets the lifecycle setting of the API version
|
|
365
412
|
<options: publish|unpublish>
|
|
366
413
|
--setdefault sets API version to be the default
|
|
367
|
-
--visibility=<option> visibility of API in
|
|
414
|
+
--visibility=<option> visibility of API in Swagger
|
|
368
415
|
<options: public|private>
|
|
369
416
|
|
|
370
417
|
DESCRIPTION
|
|
371
418
|
update an API
|
|
372
419
|
The API version from the file will be used unless the version is specified in the command argument.
|
|
373
420
|
When no file is specified then the default API version will be updated.
|
|
374
|
-
The API visibility can be changed by using visibility flag.
|
|
421
|
+
The API visibility can be changed by using the --visibility flag.
|
|
375
422
|
|
|
376
423
|
|
|
377
424
|
EXAMPLES
|
|
@@ -388,7 +435,7 @@ EXAMPLES
|
|
|
388
435
|
$ swaggerhub api:update organization/api/1.0.0 --visibility=private
|
|
389
436
|
```
|
|
390
437
|
|
|
391
|
-
_See code: [src/commands/api/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
438
|
+
_See code: [src/commands/api/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/update.js)_
|
|
392
439
|
|
|
393
440
|
## `swaggerhub api:validate`
|
|
394
441
|
|
|
@@ -399,7 +446,7 @@ USAGE
|
|
|
399
446
|
$ swaggerhub api:validate OWNER/API_NAME/[VERSION] [-c] [-j] [-h]
|
|
400
447
|
|
|
401
448
|
ARGUMENTS
|
|
402
|
-
OWNER/API_NAME/[VERSION] API to fetch validation errors for
|
|
449
|
+
OWNER/API_NAME/[VERSION] API to fetch validation errors for
|
|
403
450
|
|
|
404
451
|
FLAGS
|
|
405
452
|
-c, --fail-on-critical Exit with error code 1 if there are critical standardization errors present
|
|
@@ -410,7 +457,7 @@ DESCRIPTION
|
|
|
410
457
|
Get validation result for an API version
|
|
411
458
|
When VERSION is not included in the argument, the default version will be validated.
|
|
412
459
|
An error will occur if the API version does not exist.
|
|
413
|
-
If the flag `-c` or `--
|
|
460
|
+
If the flag `-c` or `--fail-on-critical` is used and there are standardization
|
|
414
461
|
errors with `Critical` severity present, the command will exit with error code `1`.
|
|
415
462
|
|
|
416
463
|
|
|
@@ -422,18 +469,18 @@ EXAMPLES
|
|
|
422
469
|
$ swaggerhub api:validate --fail-on-critical --json organization/api
|
|
423
470
|
```
|
|
424
471
|
|
|
425
|
-
_See code: [src/commands/api/validate/index.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
472
|
+
_See code: [src/commands/api/validate/index.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/validate/index.js)_
|
|
426
473
|
|
|
427
474
|
## `swaggerhub api:validate:download-rules`
|
|
428
475
|
|
|
429
|
-
Get
|
|
476
|
+
Get an organization's existing standardization ruleset from Swagger.
|
|
430
477
|
|
|
431
478
|
```
|
|
432
479
|
USAGE
|
|
433
480
|
$ swaggerhub api:validate:download-rules OWNER [-s] [-d] [-h]
|
|
434
481
|
|
|
435
482
|
ARGUMENTS
|
|
436
|
-
OWNER Which organization standardization rules to fetch from
|
|
483
|
+
OWNER Which organization standardization rules to fetch from Swagger
|
|
437
484
|
|
|
438
485
|
FLAGS
|
|
439
486
|
-d, --include-disabled-rules Includes disabled rules in fetched organization's ruleset
|
|
@@ -441,11 +488,11 @@ FLAGS
|
|
|
441
488
|
-s, --include-system-rules Includes system rules in fetched organization's ruleset
|
|
442
489
|
|
|
443
490
|
DESCRIPTION
|
|
444
|
-
Get
|
|
445
|
-
Requires organization name argument. An error will occur if provided organization doesn't exist
|
|
491
|
+
Get an organization's existing standardization ruleset from Swagger.
|
|
492
|
+
Requires organization name argument. An error will occur if the provided organization doesn't exist
|
|
446
493
|
or your account is not permitted to access that organization's settings.
|
|
447
|
-
If the flag `-s` or `--include-system-rules` is used, the returned ruleset will also include
|
|
448
|
-
If the flag `-d` or `--include-disabled-rules` is used, the returned ruleset will also include disabled custom rules
|
|
494
|
+
If the flag `-s` or `--include-system-rules` is used, the returned ruleset will also include Swagger system rules.
|
|
495
|
+
If the flag `-d` or `--include-disabled-rules` is used, the returned ruleset will also include disabled custom rules.
|
|
449
496
|
|
|
450
497
|
EXAMPLES
|
|
451
498
|
$ swaggerhub api:validate:download-rules myOrg -s
|
|
@@ -453,11 +500,11 @@ EXAMPLES
|
|
|
453
500
|
$ swaggerhub api:validate:download-rules myOrg --include-disabled-rules -s
|
|
454
501
|
```
|
|
455
502
|
|
|
456
|
-
_See code: [src/commands/api/validate/download-rules.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
503
|
+
_See code: [src/commands/api/validate/download-rules.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/validate/download-rules.js)_
|
|
457
504
|
|
|
458
505
|
## `swaggerhub api:validate:local`
|
|
459
506
|
|
|
460
|
-
Runs a scan against a local API definition using the organization's standardization configuration on
|
|
507
|
+
Runs a scan against a local API definition using the organization's standardization configuration on Swagger.
|
|
461
508
|
|
|
462
509
|
```
|
|
463
510
|
USAGE
|
|
@@ -472,18 +519,18 @@ FLAGS
|
|
|
472
519
|
definition
|
|
473
520
|
|
|
474
521
|
DESCRIPTION
|
|
475
|
-
Runs a scan against a local API definition using the organization's standardization configuration on
|
|
476
|
-
If the flag `-c` or `--
|
|
522
|
+
Runs a scan against a local API definition using the organization's standardization configuration on Swagger.
|
|
523
|
+
If the flag `-c` or `--fail-on-critical` is used and there are standardization
|
|
477
524
|
errors with `Critical` severity present, the command will exit with error code `1`.
|
|
478
525
|
|
|
479
526
|
|
|
480
527
|
EXAMPLES
|
|
481
528
|
$ swaggerhub api:validate:local -o myOrg -f ./my-api.yaml -c -j
|
|
482
529
|
|
|
483
|
-
$ swaggerhub api:validate:local --organization myOrg --file ./my-api
|
|
530
|
+
$ swaggerhub api:validate:local --organization myOrg --file ./my-api.json --fail-on-critical --json
|
|
484
531
|
```
|
|
485
532
|
|
|
486
|
-
_See code: [src/commands/api/validate/local.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
533
|
+
_See code: [src/commands/api/validate/local.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/api/validate/local.js)_
|
|
487
534
|
|
|
488
535
|
## `swaggerhub configure`
|
|
489
536
|
|
|
@@ -498,15 +545,43 @@ FLAGS
|
|
|
498
545
|
|
|
499
546
|
DESCRIPTION
|
|
500
547
|
configure application settings
|
|
501
|
-
Enter the
|
|
502
|
-
Customers with on-premise installations need to point this to their on-premise API, which is
|
|
548
|
+
Enter the Swagger URL - default is https://api.swaggerhub.com
|
|
549
|
+
Customers with on-premise installations (version 2.x) need to point this to their on-premise API, which is
|
|
503
550
|
http(s)://{swaggerhub-host}/v1
|
|
504
551
|
Enter the API Key - this can be retrieved from https://app.swaggerhub.com/settings/apiKey
|
|
505
552
|
You can set these as environment variables: SWAGGERHUB_URL, SWAGGERHUB_API_KEY. These take priority over config
|
|
506
553
|
settings.
|
|
507
554
|
```
|
|
508
555
|
|
|
509
|
-
_See code: [src/commands/configure.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
556
|
+
_See code: [src/commands/configure.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/configure.js)_
|
|
557
|
+
|
|
558
|
+
## `swaggerhub domain:clone`
|
|
559
|
+
|
|
560
|
+
clone a domain version as a new version
|
|
561
|
+
|
|
562
|
+
```
|
|
563
|
+
USAGE
|
|
564
|
+
$ swaggerhub domain:clone OWNER/DOMAIN_NAME/VERSION NEW_VERSION [--visibility public|private] [-h]
|
|
565
|
+
|
|
566
|
+
ARGUMENTS
|
|
567
|
+
OWNER/DOMAIN_NAME/VERSION Domain version to clone
|
|
568
|
+
NEW_VERSION Version identifier of the new domain version
|
|
569
|
+
|
|
570
|
+
FLAGS
|
|
571
|
+
-h, --help Show CLI help.
|
|
572
|
+
--visibility=<option> visibility of the new version (defaults to the server setting)
|
|
573
|
+
<options: public|private>
|
|
574
|
+
|
|
575
|
+
DESCRIPTION
|
|
576
|
+
clone a domain version as a new version
|
|
577
|
+
|
|
578
|
+
EXAMPLES
|
|
579
|
+
$ swaggerhub domain:clone organization/domain/1.0.0 1.0.1
|
|
580
|
+
|
|
581
|
+
$ swaggerhub domain:clone organization/domain/1.0.0 1.0.1 --visibility public
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
_See code: [src/commands/domain/clone.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/clone.js)_
|
|
510
585
|
|
|
511
586
|
## `swaggerhub domain:create`
|
|
512
587
|
|
|
@@ -518,7 +593,7 @@ USAGE
|
|
|
518
593
|
publish|unpublish -f <value>) [--setdefault ] [-h]
|
|
519
594
|
|
|
520
595
|
ARGUMENTS
|
|
521
|
-
OWNER/DOMAIN_NAME/[VERSION] Domain to create on
|
|
596
|
+
OWNER/DOMAIN_NAME/[VERSION] Domain to create on Swagger
|
|
522
597
|
|
|
523
598
|
FLAGS
|
|
524
599
|
-f, --file=<value> (required) file location of domain to create
|
|
@@ -526,7 +601,7 @@ FLAGS
|
|
|
526
601
|
--published=<option> [default: unpublish] sets the lifecycle setting of the domain version
|
|
527
602
|
<options: publish|unpublish>
|
|
528
603
|
--setdefault sets domain version to be the default
|
|
529
|
-
--visibility=<option> [default: private] visibility of domain in
|
|
604
|
+
--visibility=<option> [default: private] visibility of domain in Swagger
|
|
530
605
|
<options: public|private>
|
|
531
606
|
|
|
532
607
|
DESCRIPTION
|
|
@@ -540,14 +615,14 @@ EXAMPLES
|
|
|
540
615
|
|
|
541
616
|
$ swaggerhub domain:create organization/domain --file domain.yaml
|
|
542
617
|
|
|
543
|
-
$ swaggerhub domain:create organization/domain/1.0.0 --publish --file domain.json
|
|
618
|
+
$ swaggerhub domain:create organization/domain/1.0.0 --published=publish --file domain.json
|
|
544
619
|
|
|
545
620
|
$ swaggerhub domain:create organization/domain/1.0.0 --setdefault --file domain.json
|
|
546
621
|
|
|
547
|
-
$ swaggerhub domain:create organization/domain/1.0.0 --publish --setdefault --file domain.json
|
|
622
|
+
$ swaggerhub domain:create organization/domain/1.0.0 --published=publish --setdefault --file domain.json
|
|
548
623
|
```
|
|
549
624
|
|
|
550
|
-
_See code: [src/commands/domain/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
625
|
+
_See code: [src/commands/domain/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/create.js)_
|
|
551
626
|
|
|
552
627
|
## `swaggerhub domain:delete`
|
|
553
628
|
|
|
@@ -558,7 +633,7 @@ USAGE
|
|
|
558
633
|
$ swaggerhub domain:delete OWNER/DOMAIN_NAME/[VERSION] [-f] [-h]
|
|
559
634
|
|
|
560
635
|
ARGUMENTS
|
|
561
|
-
OWNER/DOMAIN_NAME/[VERSION] Domain to delete on
|
|
636
|
+
OWNER/DOMAIN_NAME/[VERSION] Domain to delete on Swagger
|
|
562
637
|
|
|
563
638
|
FLAGS
|
|
564
639
|
-f, --force delete domain without prompting for confirmation
|
|
@@ -576,7 +651,7 @@ EXAMPLES
|
|
|
576
651
|
$ swaggerhub domain:delete organization/domain --force
|
|
577
652
|
```
|
|
578
653
|
|
|
579
|
-
_See code: [src/commands/domain/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
654
|
+
_See code: [src/commands/domain/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/delete.js)_
|
|
580
655
|
|
|
581
656
|
## `swaggerhub domain:get`
|
|
582
657
|
|
|
@@ -587,7 +662,7 @@ USAGE
|
|
|
587
662
|
$ swaggerhub domain:get OWNER/DOMAIN_NAME/[VERSION] [-j] [-h]
|
|
588
663
|
|
|
589
664
|
ARGUMENTS
|
|
590
|
-
OWNER/DOMAIN_NAME/[VERSION] Domain to fetch from
|
|
665
|
+
OWNER/DOMAIN_NAME/[VERSION] Domain to fetch from Swagger
|
|
591
666
|
|
|
592
667
|
FLAGS
|
|
593
668
|
-h, --help Show CLI help.
|
|
@@ -605,7 +680,7 @@ EXAMPLES
|
|
|
605
680
|
$ swaggerhub domain:get organization/domain/1.0.0 --json
|
|
606
681
|
```
|
|
607
682
|
|
|
608
|
-
_See code: [src/commands/domain/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
683
|
+
_See code: [src/commands/domain/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/get.js)_
|
|
609
684
|
|
|
610
685
|
## `swaggerhub domain:publish`
|
|
611
686
|
|
|
@@ -613,22 +688,52 @@ publish a domain version
|
|
|
613
688
|
|
|
614
689
|
```
|
|
615
690
|
USAGE
|
|
616
|
-
$ swaggerhub domain:publish OWNER/DOMAIN_NAME/VERSION [-h]
|
|
691
|
+
$ swaggerhub domain:publish OWNER/DOMAIN_NAME/VERSION [-f] [-h]
|
|
617
692
|
|
|
618
693
|
ARGUMENTS
|
|
619
|
-
OWNER/DOMAIN_NAME/VERSION Domain to publish on
|
|
694
|
+
OWNER/DOMAIN_NAME/VERSION Domain to publish on Swagger
|
|
620
695
|
|
|
621
696
|
FLAGS
|
|
622
|
-
-
|
|
697
|
+
-f, --force publish domain without prompting for confirmation
|
|
698
|
+
-h, --help Show CLI help.
|
|
623
699
|
|
|
624
700
|
DESCRIPTION
|
|
625
701
|
publish a domain version
|
|
626
702
|
|
|
627
703
|
EXAMPLES
|
|
628
704
|
$ swaggerhub domain:publish organization/domain/1.0.0
|
|
705
|
+
|
|
706
|
+
$ swaggerhub domain:publish organization/domain/1.0.0 --force
|
|
629
707
|
```
|
|
630
708
|
|
|
631
|
-
_See code: [src/commands/domain/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
709
|
+
_See code: [src/commands/domain/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/publish.js)_
|
|
710
|
+
|
|
711
|
+
## `swaggerhub domain:rename`
|
|
712
|
+
|
|
713
|
+
rename a domain
|
|
714
|
+
|
|
715
|
+
```
|
|
716
|
+
USAGE
|
|
717
|
+
$ swaggerhub domain:rename OWNER/DOMAIN_NAME DOMAIN_NEW_NAME [-f] [-h]
|
|
718
|
+
|
|
719
|
+
ARGUMENTS
|
|
720
|
+
OWNER/DOMAIN_NAME Domain to be renamed
|
|
721
|
+
DOMAIN_NEW_NAME New name for the domain
|
|
722
|
+
|
|
723
|
+
FLAGS
|
|
724
|
+
-f, --force rename the domain even if it is referenced by APIs or other domains
|
|
725
|
+
-h, --help Show CLI help.
|
|
726
|
+
|
|
727
|
+
DESCRIPTION
|
|
728
|
+
rename a domain
|
|
729
|
+
|
|
730
|
+
EXAMPLES
|
|
731
|
+
$ swaggerhub domain:rename organization/domainOldName domainNewName
|
|
732
|
+
|
|
733
|
+
$ swaggerhub domain:rename organization/domainOldName domainNewName --force
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
_See code: [src/commands/domain/rename.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/rename.js)_
|
|
632
737
|
|
|
633
738
|
## `swaggerhub domain:setdefault`
|
|
634
739
|
|
|
@@ -639,7 +744,7 @@ USAGE
|
|
|
639
744
|
$ swaggerhub domain:setdefault OWNER/DOMAIN_NAME/VERSION [-h]
|
|
640
745
|
|
|
641
746
|
ARGUMENTS
|
|
642
|
-
OWNER/DOMAIN_NAME/VERSION Domain to set as default on
|
|
747
|
+
OWNER/DOMAIN_NAME/VERSION Domain to set as default on Swagger
|
|
643
748
|
|
|
644
749
|
FLAGS
|
|
645
750
|
-h, --help Show CLI help.
|
|
@@ -651,7 +756,7 @@ EXAMPLES
|
|
|
651
756
|
$ swaggerhub domain:setdefault organization/domain/2.0.0
|
|
652
757
|
```
|
|
653
758
|
|
|
654
|
-
_See code: [src/commands/domain/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
759
|
+
_See code: [src/commands/domain/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/setdefault.js)_
|
|
655
760
|
|
|
656
761
|
## `swaggerhub domain:unpublish`
|
|
657
762
|
|
|
@@ -662,7 +767,7 @@ USAGE
|
|
|
662
767
|
$ swaggerhub domain:unpublish OWNER/DOMAIN_NAME/VERSION [-h]
|
|
663
768
|
|
|
664
769
|
ARGUMENTS
|
|
665
|
-
OWNER/DOMAIN_NAME/VERSION Domain to unpublish on
|
|
770
|
+
OWNER/DOMAIN_NAME/VERSION Domain to unpublish on Swagger
|
|
666
771
|
|
|
667
772
|
FLAGS
|
|
668
773
|
-h, --help Show CLI help.
|
|
@@ -674,7 +779,7 @@ EXAMPLES
|
|
|
674
779
|
$ swaggerhub domain:unpublish organization/domain/1.0.0
|
|
675
780
|
```
|
|
676
781
|
|
|
677
|
-
_See code: [src/commands/domain/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
782
|
+
_See code: [src/commands/domain/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/unpublish.js)_
|
|
678
783
|
|
|
679
784
|
## `swaggerhub domain:update`
|
|
680
785
|
|
|
@@ -686,7 +791,7 @@ USAGE
|
|
|
686
791
|
publish|unpublish] [--setdefault] [-h]
|
|
687
792
|
|
|
688
793
|
ARGUMENTS
|
|
689
|
-
OWNER/DOMAIN_NAME/[VERSION] Domain to update on
|
|
794
|
+
OWNER/DOMAIN_NAME/[VERSION] Domain to update on Swagger
|
|
690
795
|
|
|
691
796
|
FLAGS
|
|
692
797
|
-f, --file=<value> file location of domain to update
|
|
@@ -694,14 +799,14 @@ FLAGS
|
|
|
694
799
|
--published=<option> sets the lifecycle setting of the domain version
|
|
695
800
|
<options: publish|unpublish>
|
|
696
801
|
--setdefault sets domain version to be the default
|
|
697
|
-
--visibility=<option> visibility of domain in
|
|
802
|
+
--visibility=<option> visibility of domain in Swagger
|
|
698
803
|
<options: public|private>
|
|
699
804
|
|
|
700
805
|
DESCRIPTION
|
|
701
806
|
update a domain
|
|
702
807
|
The domain version from the file will be used unless the version is specified in the command argument.
|
|
703
808
|
When no file is specified then the default domain version will be updated.
|
|
704
|
-
The domain visibility can be changed by using visibility flag.
|
|
809
|
+
The domain visibility can be changed by using the --visibility flag.
|
|
705
810
|
|
|
706
811
|
|
|
707
812
|
EXAMPLES
|
|
@@ -718,7 +823,7 @@ EXAMPLES
|
|
|
718
823
|
$ swaggerhub domain:update organization/domain/1.0.0 --visibility=private
|
|
719
824
|
```
|
|
720
825
|
|
|
721
|
-
_See code: [src/commands/domain/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
826
|
+
_See code: [src/commands/domain/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/domain/update.js)_
|
|
722
827
|
|
|
723
828
|
## `swaggerhub help`
|
|
724
829
|
|
|
@@ -749,7 +854,7 @@ USAGE
|
|
|
749
854
|
$ swaggerhub integration:create OWNER/API_NAME/[VERSION] -f <value> [-h]
|
|
750
855
|
|
|
751
856
|
ARGUMENTS
|
|
752
|
-
OWNER/API_NAME/[VERSION] API to add integration to on
|
|
857
|
+
OWNER/API_NAME/[VERSION] API to add integration to on Swagger
|
|
753
858
|
|
|
754
859
|
FLAGS
|
|
755
860
|
-f, --file=<value> (required) location of integration configuration file
|
|
@@ -759,14 +864,14 @@ DESCRIPTION
|
|
|
759
864
|
creates a new API integration from a JSON configuration file.
|
|
760
865
|
See the documentation for configuration files:
|
|
761
866
|
https://github.com/SmartBear/swaggerhub-cli/tree/main/examples/integrations
|
|
762
|
-
When VERSION is not included in the argument, the integration will be added to
|
|
867
|
+
When VERSION is not included in the argument, the integration will be added to the default API version.
|
|
763
868
|
|
|
764
869
|
|
|
765
870
|
EXAMPLES
|
|
766
871
|
$ swaggerhub integration:create organization/api/1.0.0 --file config.json
|
|
767
872
|
```
|
|
768
873
|
|
|
769
|
-
_See code: [src/commands/integration/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
874
|
+
_See code: [src/commands/integration/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/integration/create.js)_
|
|
770
875
|
|
|
771
876
|
## `swaggerhub integration:delete`
|
|
772
877
|
|
|
@@ -777,7 +882,7 @@ USAGE
|
|
|
777
882
|
$ swaggerhub integration:delete OWNER/API_NAME/VERSION/INTEGRATION_ID [-h]
|
|
778
883
|
|
|
779
884
|
ARGUMENTS
|
|
780
|
-
OWNER/API_NAME/VERSION/INTEGRATION_ID Integration to delete for given API on
|
|
885
|
+
OWNER/API_NAME/VERSION/INTEGRATION_ID Integration to delete for given API on Swagger
|
|
781
886
|
|
|
782
887
|
FLAGS
|
|
783
888
|
-h, --help Show CLI help.
|
|
@@ -789,7 +894,7 @@ EXAMPLES
|
|
|
789
894
|
$ swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
|
|
790
895
|
```
|
|
791
896
|
|
|
792
|
-
_See code: [src/commands/integration/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
897
|
+
_See code: [src/commands/integration/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/integration/delete.js)_
|
|
793
898
|
|
|
794
899
|
## `swaggerhub integration:execute`
|
|
795
900
|
|
|
@@ -800,7 +905,7 @@ USAGE
|
|
|
800
905
|
$ swaggerhub integration:execute OWNER/API_NAME/VERSION/INTEGRATION_ID [-h]
|
|
801
906
|
|
|
802
907
|
ARGUMENTS
|
|
803
|
-
OWNER/API_NAME/VERSION/INTEGRATION_ID Integration to execute for given API on
|
|
908
|
+
OWNER/API_NAME/VERSION/INTEGRATION_ID Integration to execute for given API on Swagger
|
|
804
909
|
|
|
805
910
|
FLAGS
|
|
806
911
|
-h, --help Show CLI help.
|
|
@@ -812,30 +917,30 @@ EXAMPLES
|
|
|
812
917
|
$ swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
|
|
813
918
|
```
|
|
814
919
|
|
|
815
|
-
_See code: [src/commands/integration/execute.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
920
|
+
_See code: [src/commands/integration/execute.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/integration/execute.js)_
|
|
816
921
|
|
|
817
922
|
## `swaggerhub integration:get`
|
|
818
923
|
|
|
819
|
-
|
|
924
|
+
retrieves an integration for the given API.
|
|
820
925
|
|
|
821
926
|
```
|
|
822
927
|
USAGE
|
|
823
928
|
$ swaggerhub integration:get OWNER/API_NAME/VERSION/INTEGRATION_ID [-h]
|
|
824
929
|
|
|
825
930
|
ARGUMENTS
|
|
826
|
-
OWNER/API_NAME/VERSION/INTEGRATION_ID Integration to fetch for given API on
|
|
931
|
+
OWNER/API_NAME/VERSION/INTEGRATION_ID Integration to fetch for given API on Swagger
|
|
827
932
|
|
|
828
933
|
FLAGS
|
|
829
934
|
-h, --help Show CLI help.
|
|
830
935
|
|
|
831
936
|
DESCRIPTION
|
|
832
|
-
|
|
937
|
+
retrieves an integration for the given API.
|
|
833
938
|
|
|
834
939
|
EXAMPLES
|
|
835
940
|
$ swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
|
|
836
941
|
```
|
|
837
942
|
|
|
838
|
-
_See code: [src/commands/integration/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
943
|
+
_See code: [src/commands/integration/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/integration/get.js)_
|
|
839
944
|
|
|
840
945
|
## `swaggerhub integration:list`
|
|
841
946
|
|
|
@@ -846,7 +951,7 @@ USAGE
|
|
|
846
951
|
$ swaggerhub integration:list OWNER/API_NAME/[VERSION] [-h]
|
|
847
952
|
|
|
848
953
|
ARGUMENTS
|
|
849
|
-
OWNER/API_NAME/[VERSION] API to list integrations for
|
|
954
|
+
OWNER/API_NAME/[VERSION] API to list integrations for
|
|
850
955
|
|
|
851
956
|
FLAGS
|
|
852
957
|
-h, --help Show CLI help.
|
|
@@ -858,7 +963,7 @@ EXAMPLES
|
|
|
858
963
|
$ swaggerhub integration:list organization/api/1.0.0
|
|
859
964
|
```
|
|
860
965
|
|
|
861
|
-
_See code: [src/commands/integration/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
966
|
+
_See code: [src/commands/integration/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/integration/list.js)_
|
|
862
967
|
|
|
863
968
|
## `swaggerhub integration:update`
|
|
864
969
|
|
|
@@ -869,7 +974,7 @@ USAGE
|
|
|
869
974
|
$ swaggerhub integration:update OWNER/API_NAME/VERSION/INTEGRATION_ID -f <value> [-h]
|
|
870
975
|
|
|
871
976
|
ARGUMENTS
|
|
872
|
-
OWNER/API_NAME/VERSION/INTEGRATION_ID Integration to update for given API on
|
|
977
|
+
OWNER/API_NAME/VERSION/INTEGRATION_ID Integration to update for given API on Swagger
|
|
873
978
|
|
|
874
979
|
FLAGS
|
|
875
980
|
-f, --file=<value> (required) location of integration configuration file
|
|
@@ -882,7 +987,7 @@ EXAMPLES
|
|
|
882
987
|
$ swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json
|
|
883
988
|
```
|
|
884
989
|
|
|
885
|
-
_See code: [src/commands/integration/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
990
|
+
_See code: [src/commands/integration/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/integration/update.js)_
|
|
886
991
|
|
|
887
992
|
## `swaggerhub plugins`
|
|
888
993
|
|
|
@@ -1183,8 +1288,8 @@ USAGE
|
|
|
1183
1288
|
$ swaggerhub project:api:add OWNER/PROJECT_NAME API [-h]
|
|
1184
1289
|
|
|
1185
1290
|
ARGUMENTS
|
|
1186
|
-
OWNER/PROJECT_NAME The project to add the API to on
|
|
1187
|
-
API The name of the API on
|
|
1291
|
+
OWNER/PROJECT_NAME The project to add the API to on Swagger
|
|
1292
|
+
API The name of the API on Swagger to add
|
|
1188
1293
|
|
|
1189
1294
|
FLAGS
|
|
1190
1295
|
-h, --help Show CLI help.
|
|
@@ -1196,51 +1301,51 @@ EXAMPLES
|
|
|
1196
1301
|
$ swaggerhub project:api:add organization/project_name my_api
|
|
1197
1302
|
```
|
|
1198
1303
|
|
|
1199
|
-
_See code: [src/commands/project/api/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1304
|
+
_See code: [src/commands/project/api/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/api/add.js)_
|
|
1200
1305
|
|
|
1201
1306
|
## `swaggerhub project:api:remove`
|
|
1202
1307
|
|
|
1203
|
-
Removes an API from a project in
|
|
1308
|
+
Removes an API from a project in Swagger.
|
|
1204
1309
|
|
|
1205
1310
|
```
|
|
1206
1311
|
USAGE
|
|
1207
1312
|
$ swaggerhub project:api:remove OWNER/PROJECT_NAME API [-h]
|
|
1208
1313
|
|
|
1209
1314
|
ARGUMENTS
|
|
1210
|
-
OWNER/PROJECT_NAME The project to remove the API from on
|
|
1211
|
-
API The name of the API on
|
|
1315
|
+
OWNER/PROJECT_NAME The project to remove the API from on Swagger
|
|
1316
|
+
API The name of the API on Swagger to remove
|
|
1212
1317
|
|
|
1213
1318
|
FLAGS
|
|
1214
1319
|
-h, --help Show CLI help.
|
|
1215
1320
|
|
|
1216
1321
|
DESCRIPTION
|
|
1217
|
-
Removes an API from a project in
|
|
1322
|
+
Removes an API from a project in Swagger.
|
|
1218
1323
|
|
|
1219
1324
|
EXAMPLES
|
|
1220
1325
|
$ swaggerhub project:api:remove organization/project_name my_api
|
|
1221
1326
|
```
|
|
1222
1327
|
|
|
1223
|
-
_See code: [src/commands/project/api/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1328
|
+
_See code: [src/commands/project/api/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/api/remove.js)_
|
|
1224
1329
|
|
|
1225
1330
|
## `swaggerhub project:create`
|
|
1226
1331
|
|
|
1227
|
-
Creates a new project in
|
|
1332
|
+
Creates a new project in Swagger.
|
|
1228
1333
|
|
|
1229
1334
|
```
|
|
1230
1335
|
USAGE
|
|
1231
1336
|
$ swaggerhub project:create OWNER/PROJECT_NAME [--description <value>] [-a <value>] [-d <value>] [-h]
|
|
1232
1337
|
|
|
1233
1338
|
ARGUMENTS
|
|
1234
|
-
OWNER/PROJECT_NAME The new project to create on
|
|
1339
|
+
OWNER/PROJECT_NAME The new project to create on Swagger
|
|
1235
1340
|
|
|
1236
1341
|
FLAGS
|
|
1237
|
-
-a, --apis=<value> Comma
|
|
1238
|
-
-d, --domains=<value> Comma
|
|
1342
|
+
-a, --apis=<value> Comma-separated list of API names to include in project
|
|
1343
|
+
-d, --domains=<value> Comma-separated list of domain names to include in project
|
|
1239
1344
|
-h, --help Show CLI help.
|
|
1240
1345
|
--description=<value> Description of project
|
|
1241
1346
|
|
|
1242
1347
|
DESCRIPTION
|
|
1243
|
-
Creates a new project in
|
|
1348
|
+
Creates a new project in Swagger.
|
|
1244
1349
|
|
|
1245
1350
|
EXAMPLES
|
|
1246
1351
|
$ swaggerhub project:create organization/new_project_name --description "project description"
|
|
@@ -1256,30 +1361,30 @@ EXAMPLES
|
|
|
1256
1361
|
$ swaggerhub project:create organization/new_project_name -a "testapi1" -d "testdomain3" --description "description"
|
|
1257
1362
|
```
|
|
1258
1363
|
|
|
1259
|
-
_See code: [src/commands/project/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1364
|
+
_See code: [src/commands/project/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/create.js)_
|
|
1260
1365
|
|
|
1261
1366
|
## `swaggerhub project:delete`
|
|
1262
1367
|
|
|
1263
|
-
Deletes a project from
|
|
1368
|
+
Deletes a project from Swagger.
|
|
1264
1369
|
|
|
1265
1370
|
```
|
|
1266
1371
|
USAGE
|
|
1267
1372
|
$ swaggerhub project:delete OWNER/PROJECT_NAME [-h]
|
|
1268
1373
|
|
|
1269
1374
|
ARGUMENTS
|
|
1270
|
-
OWNER/PROJECT_NAME The project to delete on
|
|
1375
|
+
OWNER/PROJECT_NAME The project to delete on Swagger
|
|
1271
1376
|
|
|
1272
1377
|
FLAGS
|
|
1273
1378
|
-h, --help Show CLI help.
|
|
1274
1379
|
|
|
1275
1380
|
DESCRIPTION
|
|
1276
|
-
Deletes a project from
|
|
1381
|
+
Deletes a project from Swagger.
|
|
1277
1382
|
|
|
1278
1383
|
EXAMPLES
|
|
1279
1384
|
$ swaggerhub project:delete organization/project_name
|
|
1280
1385
|
```
|
|
1281
1386
|
|
|
1282
|
-
_See code: [src/commands/project/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1387
|
+
_See code: [src/commands/project/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/delete.js)_
|
|
1283
1388
|
|
|
1284
1389
|
## `swaggerhub project:domain:add`
|
|
1285
1390
|
|
|
@@ -1290,8 +1395,8 @@ USAGE
|
|
|
1290
1395
|
$ swaggerhub project:domain:add OWNER/PROJECT_NAME DOMAIN [-h]
|
|
1291
1396
|
|
|
1292
1397
|
ARGUMENTS
|
|
1293
|
-
OWNER/PROJECT_NAME The project to add the domain to on
|
|
1294
|
-
DOMAIN The name of the domain on
|
|
1398
|
+
OWNER/PROJECT_NAME The project to add the domain to on Swagger
|
|
1399
|
+
DOMAIN The name of the domain on Swagger to add
|
|
1295
1400
|
|
|
1296
1401
|
FLAGS
|
|
1297
1402
|
-h, --help Show CLI help.
|
|
@@ -1303,31 +1408,31 @@ EXAMPLES
|
|
|
1303
1408
|
$ swaggerhub project:domain:add organization/project_name my_domain
|
|
1304
1409
|
```
|
|
1305
1410
|
|
|
1306
|
-
_See code: [src/commands/project/domain/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1411
|
+
_See code: [src/commands/project/domain/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/domain/add.js)_
|
|
1307
1412
|
|
|
1308
1413
|
## `swaggerhub project:domain:remove`
|
|
1309
1414
|
|
|
1310
|
-
Removes a domain from a project in
|
|
1415
|
+
Removes a domain from a project in Swagger.
|
|
1311
1416
|
|
|
1312
1417
|
```
|
|
1313
1418
|
USAGE
|
|
1314
1419
|
$ swaggerhub project:domain:remove OWNER/PROJECT_NAME DOMAIN [-h]
|
|
1315
1420
|
|
|
1316
1421
|
ARGUMENTS
|
|
1317
|
-
OWNER/PROJECT_NAME The project to remove the domain from on
|
|
1318
|
-
DOMAIN The name of the domain on
|
|
1422
|
+
OWNER/PROJECT_NAME The project to remove the domain from on Swagger
|
|
1423
|
+
DOMAIN The name of the domain on Swagger to remove
|
|
1319
1424
|
|
|
1320
1425
|
FLAGS
|
|
1321
1426
|
-h, --help Show CLI help.
|
|
1322
1427
|
|
|
1323
1428
|
DESCRIPTION
|
|
1324
|
-
Removes a domain from a project in
|
|
1429
|
+
Removes a domain from a project in Swagger.
|
|
1325
1430
|
|
|
1326
1431
|
EXAMPLES
|
|
1327
1432
|
$ swaggerhub project:domain:remove organization/project_name my_domain
|
|
1328
1433
|
```
|
|
1329
1434
|
|
|
1330
|
-
_See code: [src/commands/project/domain/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1435
|
+
_See code: [src/commands/project/domain/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/domain/remove.js)_
|
|
1331
1436
|
|
|
1332
1437
|
## `swaggerhub project:get`
|
|
1333
1438
|
|
|
@@ -1338,7 +1443,7 @@ USAGE
|
|
|
1338
1443
|
$ swaggerhub project:get OWNER/PROJECT_NAME [-h]
|
|
1339
1444
|
|
|
1340
1445
|
ARGUMENTS
|
|
1341
|
-
OWNER/PROJECT_NAME The project to get details for on
|
|
1446
|
+
OWNER/PROJECT_NAME The project to get details for on Swagger
|
|
1342
1447
|
|
|
1343
1448
|
FLAGS
|
|
1344
1449
|
-h, --help Show CLI help.
|
|
@@ -1350,7 +1455,7 @@ EXAMPLES
|
|
|
1350
1455
|
$ swaggerhub project:get organization/project_name
|
|
1351
1456
|
```
|
|
1352
1457
|
|
|
1353
|
-
_See code: [src/commands/project/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1458
|
+
_See code: [src/commands/project/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/get.js)_
|
|
1354
1459
|
|
|
1355
1460
|
## `swaggerhub project:list`
|
|
1356
1461
|
|
|
@@ -1358,13 +1463,17 @@ list projects
|
|
|
1358
1463
|
|
|
1359
1464
|
```
|
|
1360
1465
|
USAGE
|
|
1361
|
-
$ swaggerhub project:list [OWNER] [-h]
|
|
1466
|
+
$ swaggerhub project:list [OWNER] [-h] [-l <value>] [--page <value>] [--order ASC|DESC]
|
|
1362
1467
|
|
|
1363
1468
|
ARGUMENTS
|
|
1364
|
-
OWNER The organization to list projects for on
|
|
1469
|
+
OWNER The organization to list projects for on Swagger
|
|
1365
1470
|
|
|
1366
1471
|
FLAGS
|
|
1367
|
-
-h, --help
|
|
1472
|
+
-h, --help Show CLI help.
|
|
1473
|
+
-l, --limit=<value> number of projects per page (1-100)
|
|
1474
|
+
--order=<option> sort order of the projects
|
|
1475
|
+
<options: ASC|DESC>
|
|
1476
|
+
--page=<value> zero-based page of projects to return
|
|
1368
1477
|
|
|
1369
1478
|
DESCRIPTION
|
|
1370
1479
|
list projects
|
|
@@ -1373,9 +1482,13 @@ EXAMPLES
|
|
|
1373
1482
|
$ swaggerhub project:list
|
|
1374
1483
|
|
|
1375
1484
|
$ swaggerhub project:list organization
|
|
1485
|
+
|
|
1486
|
+
$ swaggerhub project:list organization --limit 20 --order DESC
|
|
1487
|
+
|
|
1488
|
+
$ swaggerhub project:list organization --page 2 --limit 20
|
|
1376
1489
|
```
|
|
1377
1490
|
|
|
1378
|
-
_See code: [src/commands/project/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1491
|
+
_See code: [src/commands/project/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/list.js)_
|
|
1379
1492
|
|
|
1380
1493
|
## `swaggerhub project:member:list`
|
|
1381
1494
|
|
|
@@ -1386,7 +1499,7 @@ USAGE
|
|
|
1386
1499
|
$ swaggerhub project:member:list OWNER/PROJECT_NAME [-h]
|
|
1387
1500
|
|
|
1388
1501
|
ARGUMENTS
|
|
1389
|
-
OWNER/PROJECT_NAME Project to list members of
|
|
1502
|
+
OWNER/PROJECT_NAME Project to list members of
|
|
1390
1503
|
|
|
1391
1504
|
FLAGS
|
|
1392
1505
|
-h, --help Show CLI help.
|
|
@@ -1395,10 +1508,10 @@ DESCRIPTION
|
|
|
1395
1508
|
list members of a project
|
|
1396
1509
|
|
|
1397
1510
|
EXAMPLES
|
|
1398
|
-
$ swaggerhub project:member:list
|
|
1511
|
+
$ swaggerhub project:member:list organization/project_name
|
|
1399
1512
|
```
|
|
1400
1513
|
|
|
1401
|
-
_See code: [src/commands/project/member/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1514
|
+
_See code: [src/commands/project/member/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/project/member/list.js)_
|
|
1402
1515
|
|
|
1403
1516
|
## `swaggerhub spectral:download`
|
|
1404
1517
|
|
|
@@ -1409,7 +1522,7 @@ USAGE
|
|
|
1409
1522
|
$ swaggerhub spectral:download OWNER/RULESET_NAME DIRECTORY [-h]
|
|
1410
1523
|
|
|
1411
1524
|
ARGUMENTS
|
|
1412
|
-
OWNER/RULESET_NAME Organization's Spectral ruleset to create or update on
|
|
1525
|
+
OWNER/RULESET_NAME Organization's Spectral ruleset to create or update on Swagger
|
|
1413
1526
|
DIRECTORY Relative path to directory the ruleset files should be saved to
|
|
1414
1527
|
|
|
1415
1528
|
FLAGS
|
|
@@ -1422,7 +1535,7 @@ EXAMPLES
|
|
|
1422
1535
|
$ swaggerhub spectral:download my_organization/my_api_ruleset rules/
|
|
1423
1536
|
```
|
|
1424
1537
|
|
|
1425
|
-
_See code: [src/commands/spectral/download.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1538
|
+
_See code: [src/commands/spectral/download.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/spectral/download.js)_
|
|
1426
1539
|
|
|
1427
1540
|
## `swaggerhub spectral:upload`
|
|
1428
1541
|
|
|
@@ -1433,7 +1546,7 @@ USAGE
|
|
|
1433
1546
|
$ swaggerhub spectral:upload OWNER/RULESET_NAME DIRECTORY [-h]
|
|
1434
1547
|
|
|
1435
1548
|
ARGUMENTS
|
|
1436
|
-
OWNER/RULESET_NAME Organization's Spectral ruleset to create or update on
|
|
1549
|
+
OWNER/RULESET_NAME Organization's Spectral ruleset to create or update on Swagger
|
|
1437
1550
|
DIRECTORY Relative path to directory with ruleset files
|
|
1438
1551
|
|
|
1439
1552
|
FLAGS
|
|
@@ -1446,12 +1559,12 @@ EXAMPLES
|
|
|
1446
1559
|
$ swaggerhub spectral:upload my_organization/my_api_ruleset rules/
|
|
1447
1560
|
```
|
|
1448
1561
|
|
|
1449
|
-
_See code: [src/commands/spectral/upload.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.
|
|
1562
|
+
_See code: [src/commands/spectral/upload.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.14.0/src/commands/spectral/upload.js)_
|
|
1450
1563
|
<!-- commandsstop -->
|
|
1451
1564
|
|
|
1452
1565
|
# Plugins
|
|
1453
1566
|
|
|
1454
|
-
The
|
|
1567
|
+
The Swagger CLI supports plugins via the [oclif plugin](https://oclif.io/docs/plugins) infrastructure.
|
|
1455
1568
|
|
|
1456
1569
|
To install a plugin
|
|
1457
1570
|
|
|
@@ -1488,5 +1601,5 @@ $ swaggerhub schema:get ansible
|
|
|
1488
1601
|
|
|
1489
1602
|
# Contributing
|
|
1490
1603
|
<!-- contributing -->
|
|
1491
|
-
|
|
1604
|
+
Contributions are welcome. If you’ve found a bug or a typo, or have a feature request or general feedback, please open an [issue](https://github.com/SmartBear/swaggerhub-cli/issues). Pull requests are welcome too; for larger changes, please open an issue first so we can discuss the approach.
|
|
1492
1605
|
<!-- contributingstop -->
|