swaggerhub-cli 0.14.0 → 0.16.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.
Files changed (76) hide show
  1. package/README.md +152 -41
  2. package/bin/run +5 -4
  3. package/oclif.manifest.json +841 -670
  4. package/package.json +21 -16
  5. package/skills/swaggerhub-cli/SKILL.md +43 -0
  6. package/src/check-node-version.js +3 -2
  7. package/src/commands/api/clone.js +8 -7
  8. package/src/commands/api/comment/list.js +91 -0
  9. package/src/commands/api/create.js +8 -8
  10. package/src/commands/api/delete.js +6 -6
  11. package/src/commands/api/fork.js +75 -0
  12. package/src/commands/api/get.js +7 -7
  13. package/src/commands/api/publish.js +6 -6
  14. package/src/commands/api/rename.js +8 -10
  15. package/src/commands/api/setdefault.js +5 -5
  16. package/src/commands/api/unpublish.js +5 -5
  17. package/src/commands/api/update.js +8 -8
  18. package/src/commands/api/validate/download-rules.js +6 -6
  19. package/src/commands/api/validate/index.js +8 -8
  20. package/src/commands/api/validate/local.js +8 -8
  21. package/src/commands/configure.js +6 -6
  22. package/src/commands/domain/clone.js +8 -7
  23. package/src/commands/domain/create.js +8 -8
  24. package/src/commands/domain/delete.js +6 -6
  25. package/src/commands/domain/fork.js +75 -0
  26. package/src/commands/domain/get.js +7 -7
  27. package/src/commands/domain/publish.js +5 -5
  28. package/src/commands/domain/rename.js +9 -8
  29. package/src/commands/domain/setdefault.js +5 -5
  30. package/src/commands/domain/unpublish.js +5 -5
  31. package/src/commands/domain/update.js +8 -8
  32. package/src/commands/integration/create.js +5 -5
  33. package/src/commands/integration/delete.js +5 -5
  34. package/src/commands/integration/execute.js +5 -5
  35. package/src/commands/integration/get.js +7 -7
  36. package/src/commands/integration/list.js +6 -6
  37. package/src/commands/integration/update.js +5 -5
  38. package/src/commands/project/api/add.js +5 -7
  39. package/src/commands/project/api/remove.js +7 -10
  40. package/src/commands/project/create.js +5 -9
  41. package/src/commands/project/delete.js +5 -5
  42. package/src/commands/project/domain/add.js +5 -7
  43. package/src/commands/project/domain/remove.js +7 -10
  44. package/src/commands/project/get.js +7 -7
  45. package/src/commands/project/list.js +5 -5
  46. package/src/commands/project/member/list.js +6 -6
  47. package/src/commands/spectral/download.js +8 -8
  48. package/src/commands/spectral/upload.js +10 -10
  49. package/src/config/index.js +27 -5
  50. package/src/format-readme.js +3 -2
  51. package/src/help.js +2 -2
  52. package/src/hooks/setup-config.js +11 -6
  53. package/src/index.js +2 -2
  54. package/src/requests/api.js +3 -3
  55. package/src/requests/domain.js +3 -3
  56. package/src/requests/project.js +2 -2
  57. package/src/requests/spec.js +5 -5
  58. package/src/requests/spectral.js +3 -3
  59. package/src/requests/standardization.js +4 -4
  60. package/src/support/command/base-command.js +10 -11
  61. package/src/support/command/base-validate-command.js +3 -3
  62. package/src/support/command/handle-response.js +7 -5
  63. package/src/support/command/parse-input.js +8 -6
  64. package/src/support/command/update-command.js +5 -5
  65. package/src/support/http/default-headers.js +1 -1
  66. package/src/support/http/header-templates.js +2 -2
  67. package/src/support/http/index.js +7 -7
  68. package/src/support/http/proxy-agent.js +4 -4
  69. package/src/support/inquirer/index.js +4 -4
  70. package/src/support/inquirer/prompt-templates.js +2 -2
  71. package/src/support/isOnPrem.js +4 -4
  72. package/src/template-strings/errors.js +2 -2
  73. package/src/template-strings/index.js +3 -3
  74. package/src/template-strings/info.js +6 -2
  75. package/src/utils/definitions.js +8 -6
  76. package/src/utils/general.js +3 -3
@@ -21,31 +21,31 @@
21
21
  "pluginType": "core",
22
22
  "strict": true,
23
23
  "enableJsonFlag": false,
24
- "isESM": false,
24
+ "isESM": true,
25
25
  "relativePath": [
26
26
  "src",
27
27
  "commands",
28
28
  "configure.js"
29
29
  ]
30
30
  },
31
- "api:clone": {
31
+ "domain:clone": {
32
32
  "aliases": [],
33
33
  "args": {
34
- "OWNER/API_NAME/VERSION": {
35
- "description": "API version to clone",
36
- "name": "OWNER/API_NAME/VERSION",
34
+ "OWNER/DOMAIN_NAME/VERSION": {
35
+ "description": "Domain version to clone",
36
+ "name": "OWNER/DOMAIN_NAME/VERSION",
37
37
  "required": true
38
38
  },
39
39
  "NEW_VERSION": {
40
- "description": "Version identifier of the new API version",
40
+ "description": "Version identifier of the new domain version",
41
41
  "name": "NEW_VERSION",
42
42
  "required": true
43
43
  }
44
44
  },
45
- "description": "clone an API version as a new version",
45
+ "description": "clone a domain version as a new version",
46
46
  "examples": [
47
- "swaggerhub api:clone organization/api/1.0.0 1.0.1",
48
- "swaggerhub api:clone organization/api/1.0.0 1.0.1 --visibility public"
47
+ "swaggerhub domain:clone organization/domain/1.0.0 1.0.1",
48
+ "swaggerhub domain:clone organization/domain/1.0.0 1.0.1 --visibility public"
49
49
  ],
50
50
  "flags": {
51
51
  "visibility": {
@@ -69,41 +69,41 @@
69
69
  },
70
70
  "hasDynamicHelp": false,
71
71
  "hiddenAliases": [],
72
- "id": "api:clone",
72
+ "id": "domain:clone",
73
73
  "pluginAlias": "swaggerhub-cli",
74
74
  "pluginName": "swaggerhub-cli",
75
75
  "pluginType": "core",
76
76
  "strict": true,
77
77
  "enableJsonFlag": false,
78
- "isESM": false,
78
+ "isESM": true,
79
79
  "relativePath": [
80
80
  "src",
81
81
  "commands",
82
- "api",
82
+ "domain",
83
83
  "clone.js"
84
84
  ]
85
85
  },
86
- "api:create": {
86
+ "domain:create": {
87
87
  "aliases": [],
88
88
  "args": {
89
- "OWNER/API_NAME/[VERSION]": {
90
- "description": "API to create on Swagger",
91
- "name": "OWNER/API_NAME/[VERSION]",
89
+ "OWNER/DOMAIN_NAME/[VERSION]": {
90
+ "description": "Domain to create on Swagger",
91
+ "name": "OWNER/DOMAIN_NAME/[VERSION]",
92
92
  "required": true
93
93
  }
94
94
  },
95
- "description": "creates a new API / API version from a YAML/JSON file\nThe API version from the file will be used unless the version is specified in the command argument.\nAn error will occur if the API version already exists.\n",
95
+ "description": "creates a new domain / domain version from a YAML/JSON file\nThe domain version from the file will be used unless the version is specified in the command argument.\nAn error will occur if the domain version already exists.\n",
96
96
  "examples": [
97
- "swaggerhub api:create organization/api/1.0.0 --file api.yaml --visibility public",
98
- "swaggerhub api:create organization/api --file api.yaml",
99
- "swaggerhub api:create organization/api/1.0.0 --published=publish --file api.json",
100
- "swaggerhub api:create organization/api/1.0.0 --setdefault --file api.json",
101
- "swaggerhub api:create organization/api/1.0.0 --published=publish --setdefault --file api.json"
97
+ "swaggerhub domain:create organization/domain/1.0.0 --file domain.yaml --visibility public",
98
+ "swaggerhub domain:create organization/domain --file domain.yaml",
99
+ "swaggerhub domain:create organization/domain/1.0.0 --published=publish --file domain.json",
100
+ "swaggerhub domain:create organization/domain/1.0.0 --setdefault --file domain.json",
101
+ "swaggerhub domain:create organization/domain/1.0.0 --published=publish --setdefault --file domain.json"
102
102
  ],
103
103
  "flags": {
104
104
  "file": {
105
105
  "char": "f",
106
- "description": "file location of API to create",
106
+ "description": "file location of domain to create",
107
107
  "name": "file",
108
108
  "required": true,
109
109
  "hasDynamicHelp": false,
@@ -111,7 +111,7 @@
111
111
  "type": "option"
112
112
  },
113
113
  "visibility": {
114
- "description": "visibility of API in Swagger",
114
+ "description": "visibility of domain in Swagger",
115
115
  "name": "visibility",
116
116
  "default": "private",
117
117
  "hasDynamicHelp": false,
@@ -126,7 +126,7 @@
126
126
  "dependsOn": [
127
127
  "file"
128
128
  ],
129
- "description": "sets the lifecycle setting of the API version",
129
+ "description": "sets the lifecycle setting of the domain version",
130
130
  "name": "published",
131
131
  "required": false,
132
132
  "default": "unpublish",
@@ -142,7 +142,7 @@
142
142
  "dependsOn": [
143
143
  "file"
144
144
  ],
145
- "description": "sets API version to be the default",
145
+ "description": "sets domain version to be the default",
146
146
  "name": "setdefault",
147
147
  "required": false,
148
148
  "allowNo": false,
@@ -158,38 +158,38 @@
158
158
  },
159
159
  "hasDynamicHelp": false,
160
160
  "hiddenAliases": [],
161
- "id": "api:create",
161
+ "id": "domain:create",
162
162
  "pluginAlias": "swaggerhub-cli",
163
163
  "pluginName": "swaggerhub-cli",
164
164
  "pluginType": "core",
165
165
  "strict": true,
166
- "isESM": false,
166
+ "isESM": true,
167
167
  "relativePath": [
168
168
  "src",
169
169
  "commands",
170
- "api",
170
+ "domain",
171
171
  "create.js"
172
172
  ]
173
173
  },
174
- "api:delete": {
174
+ "domain:delete": {
175
175
  "aliases": [],
176
176
  "args": {
177
- "OWNER/API_NAME/[VERSION]": {
178
- "description": "API to delete on Swagger",
179
- "name": "OWNER/API_NAME/[VERSION]",
177
+ "OWNER/DOMAIN_NAME/[VERSION]": {
178
+ "description": "Domain to delete on Swagger",
179
+ "name": "OWNER/DOMAIN_NAME/[VERSION]",
180
180
  "required": true
181
181
  }
182
182
  },
183
- "description": "delete an API or API version\n",
183
+ "description": "delete a domain or domain version\n",
184
184
  "examples": [
185
- "swaggerhub api:delete organization/api/1.0.0",
186
- "swaggerhub api:delete organization/api",
187
- "swaggerhub api:delete organization/api --force"
185
+ "swaggerhub domain:delete organization/domain/1.0.0",
186
+ "swaggerhub domain:delete organization/domain",
187
+ "swaggerhub domain:delete organization/domain --force"
188
188
  ],
189
189
  "flags": {
190
190
  "force": {
191
191
  "char": "f",
192
- "description": "delete API without prompting for confirmation",
192
+ "description": "delete domain without prompting for confirmation",
193
193
  "name": "force",
194
194
  "allowNo": false,
195
195
  "type": "boolean"
@@ -204,49 +204,104 @@
204
204
  },
205
205
  "hasDynamicHelp": false,
206
206
  "hiddenAliases": [],
207
- "id": "api:delete",
207
+ "id": "domain:delete",
208
208
  "pluginAlias": "swaggerhub-cli",
209
209
  "pluginName": "swaggerhub-cli",
210
210
  "pluginType": "core",
211
211
  "strict": true,
212
212
  "enableJsonFlag": false,
213
- "isESM": false,
213
+ "isESM": true,
214
214
  "relativePath": [
215
215
  "src",
216
216
  "commands",
217
- "api",
217
+ "domain",
218
218
  "delete.js"
219
219
  ]
220
220
  },
221
- "api:get": {
221
+ "domain:fork": {
222
222
  "aliases": [],
223
223
  "args": {
224
- "OWNER/API_NAME/[VERSION]": {
225
- "description": "API to fetch from Swagger",
226
- "name": "OWNER/API_NAME/[VERSION]",
224
+ "OWNER/DOMAIN_NAME/VERSION": {
225
+ "description": "Domain version to fork",
226
+ "name": "OWNER/DOMAIN_NAME/VERSION",
227
+ "required": true
228
+ },
229
+ "NEW_OWNER/NEW_DOMAIN_NAME/NEW_VERSION": {
230
+ "description": "Owner, name and version of the fork. An existing domain name creates a new version of it.",
231
+ "name": "NEW_OWNER/NEW_DOMAIN_NAME/NEW_VERSION",
227
232
  "required": true
228
233
  }
229
234
  },
230
- "description": "fetches an API definition\nWhen VERSION is not included in the argument, the default version will be returned.\nReturns the API in YAML format by default.\n",
235
+ "description": "fork a domain version\nThe fork can be created as a new domain, or as a new version of another existing domain.\n",
231
236
  "examples": [
232
- "swaggerhub api:get organization/api",
233
- "swaggerhub api:get organization/api/1.0.0 --json"
237
+ "swaggerhub domain:fork organization/domain/1.0.0 myorg/domain-fork/1.0.0",
238
+ "swaggerhub domain:fork organization/domain/1.0.0 myorg/domain-fork/1.0.0 --project my-project --visibility private"
239
+ ],
240
+ "flags": {
241
+ "project": {
242
+ "description": "existing project of the target organization to add the fork to",
243
+ "name": "project",
244
+ "hasDynamicHelp": false,
245
+ "multiple": false,
246
+ "type": "option"
247
+ },
248
+ "visibility": {
249
+ "description": "visibility of the fork (defaults to the visibility of the source version)",
250
+ "name": "visibility",
251
+ "hasDynamicHelp": false,
252
+ "multiple": false,
253
+ "options": [
254
+ "public",
255
+ "private"
256
+ ],
257
+ "type": "option"
258
+ },
259
+ "help": {
260
+ "char": "h",
261
+ "description": "Show CLI help.",
262
+ "name": "help",
263
+ "allowNo": false,
264
+ "type": "boolean"
265
+ }
266
+ },
267
+ "hasDynamicHelp": false,
268
+ "hiddenAliases": [],
269
+ "id": "domain:fork",
270
+ "pluginAlias": "swaggerhub-cli",
271
+ "pluginName": "swaggerhub-cli",
272
+ "pluginType": "core",
273
+ "strict": true,
274
+ "enableJsonFlag": false,
275
+ "isESM": true,
276
+ "relativePath": [
277
+ "src",
278
+ "commands",
279
+ "domain",
280
+ "fork.js"
281
+ ]
282
+ },
283
+ "domain:get": {
284
+ "aliases": [],
285
+ "args": {
286
+ "OWNER/DOMAIN_NAME/[VERSION]": {
287
+ "description": "Domain to fetch from Swagger",
288
+ "name": "OWNER/DOMAIN_NAME/[VERSION]",
289
+ "required": true
290
+ }
291
+ },
292
+ "description": "fetches a domain definition\nWhen VERSION is not included in the argument, the default version will be returned.\nReturns the domain in YAML format by default.\n",
293
+ "examples": [
294
+ "swaggerhub domain:get organization/domain",
295
+ "swaggerhub domain:get organization/domain/1.0.0 --json"
234
296
  ],
235
297
  "flags": {
236
298
  "json": {
237
299
  "char": "j",
238
- "description": "returns the API in JSON format.",
300
+ "description": "returns the domain in JSON format.",
239
301
  "name": "json",
240
302
  "allowNo": false,
241
303
  "type": "boolean"
242
304
  },
243
- "resolved": {
244
- "char": "r",
245
- "description": "gets the resolved API definition",
246
- "name": "resolved",
247
- "allowNo": false,
248
- "type": "boolean"
249
- },
250
305
  "help": {
251
306
  "char": "h",
252
307
  "description": "Show CLI help.",
@@ -257,38 +312,38 @@
257
312
  },
258
313
  "hasDynamicHelp": false,
259
314
  "hiddenAliases": [],
260
- "id": "api:get",
315
+ "id": "domain:get",
261
316
  "pluginAlias": "swaggerhub-cli",
262
317
  "pluginName": "swaggerhub-cli",
263
318
  "pluginType": "core",
264
319
  "strict": true,
265
320
  "enableJsonFlag": false,
266
- "isESM": false,
321
+ "isESM": true,
267
322
  "relativePath": [
268
323
  "src",
269
324
  "commands",
270
- "api",
325
+ "domain",
271
326
  "get.js"
272
327
  ]
273
328
  },
274
- "api:publish": {
329
+ "domain:publish": {
275
330
  "aliases": [],
276
331
  "args": {
277
- "OWNER/API_NAME/VERSION": {
278
- "description": "API to publish on Swagger",
279
- "name": "OWNER/API_NAME/VERSION",
332
+ "OWNER/DOMAIN_NAME/VERSION": {
333
+ "description": "Domain to publish on Swagger",
334
+ "name": "OWNER/DOMAIN_NAME/VERSION",
280
335
  "required": true
281
336
  }
282
337
  },
283
- "description": "publish an API version",
338
+ "description": "publish a domain version",
284
339
  "examples": [
285
- "swaggerhub api:publish organization/api/1.0.0",
286
- "swaggerhub api:publish organization/api/1.0.0 --force"
340
+ "swaggerhub domain:publish organization/domain/1.0.0",
341
+ "swaggerhub domain:publish organization/domain/1.0.0 --force"
287
342
  ],
288
343
  "flags": {
289
344
  "force": {
290
345
  "char": "f",
291
- "description": "publish API without prompting for confirmation",
346
+ "description": "publish domain without prompting for confirmation",
292
347
  "name": "force",
293
348
  "allowNo": false,
294
349
  "type": "boolean"
@@ -303,38 +358,46 @@
303
358
  },
304
359
  "hasDynamicHelp": false,
305
360
  "hiddenAliases": [],
306
- "id": "api:publish",
361
+ "id": "domain:publish",
307
362
  "pluginAlias": "swaggerhub-cli",
308
363
  "pluginName": "swaggerhub-cli",
309
364
  "pluginType": "core",
310
365
  "strict": true,
311
- "isESM": false,
366
+ "isESM": true,
312
367
  "relativePath": [
313
368
  "src",
314
369
  "commands",
315
- "api",
370
+ "domain",
316
371
  "publish.js"
317
372
  ]
318
373
  },
319
- "api:rename": {
374
+ "domain:rename": {
320
375
  "aliases": [],
321
376
  "args": {
322
- "OWNER/API_NAME": {
323
- "description": "API to be renamed",
324
- "name": "OWNER/API_NAME",
377
+ "OWNER/DOMAIN_NAME": {
378
+ "description": "Domain to be renamed",
379
+ "name": "OWNER/DOMAIN_NAME",
325
380
  "required": true
326
381
  },
327
- "API_NEW_NAME": {
328
- "description": "New name for the API",
329
- "name": "API_NEW_NAME",
382
+ "DOMAIN_NEW_NAME": {
383
+ "description": "New name for the domain",
384
+ "name": "DOMAIN_NEW_NAME",
330
385
  "required": true
331
386
  }
332
387
  },
333
- "description": "rename an API",
388
+ "description": "rename a domain",
334
389
  "examples": [
335
- "swaggerhub api:rename organization/apiOldName apiNewName"
390
+ "swaggerhub domain:rename organization/domainOldName domainNewName",
391
+ "swaggerhub domain:rename organization/domainOldName domainNewName --force"
336
392
  ],
337
393
  "flags": {
394
+ "force": {
395
+ "char": "f",
396
+ "description": "rename the domain even if it is referenced by APIs or other domains",
397
+ "name": "force",
398
+ "allowNo": false,
399
+ "type": "boolean"
400
+ },
338
401
  "help": {
339
402
  "char": "h",
340
403
  "description": "Show CLI help.",
@@ -345,32 +408,32 @@
345
408
  },
346
409
  "hasDynamicHelp": false,
347
410
  "hiddenAliases": [],
348
- "id": "api:rename",
411
+ "id": "domain:rename",
349
412
  "pluginAlias": "swaggerhub-cli",
350
413
  "pluginName": "swaggerhub-cli",
351
414
  "pluginType": "core",
352
415
  "strict": true,
353
416
  "enableJsonFlag": false,
354
- "isESM": false,
417
+ "isESM": true,
355
418
  "relativePath": [
356
419
  "src",
357
420
  "commands",
358
- "api",
421
+ "domain",
359
422
  "rename.js"
360
423
  ]
361
424
  },
362
- "api:setdefault": {
425
+ "domain:setdefault": {
363
426
  "aliases": [],
364
427
  "args": {
365
- "OWNER/API_NAME/VERSION": {
366
- "description": "API to set as default on Swagger",
367
- "name": "OWNER/API_NAME/VERSION",
428
+ "OWNER/DOMAIN_NAME/VERSION": {
429
+ "description": "Domain to set as default on Swagger",
430
+ "name": "OWNER/DOMAIN_NAME/VERSION",
368
431
  "required": true
369
432
  }
370
433
  },
371
- "description": "set the default version of an API",
434
+ "description": "set the default version of a domain",
372
435
  "examples": [
373
- "swaggerhub api:setdefault organization/api/2.0.0"
436
+ "swaggerhub domain:setdefault organization/domain/2.0.0"
374
437
  ],
375
438
  "flags": {
376
439
  "help": {
@@ -383,31 +446,31 @@
383
446
  },
384
447
  "hasDynamicHelp": false,
385
448
  "hiddenAliases": [],
386
- "id": "api:setdefault",
449
+ "id": "domain:setdefault",
387
450
  "pluginAlias": "swaggerhub-cli",
388
451
  "pluginName": "swaggerhub-cli",
389
452
  "pluginType": "core",
390
453
  "strict": true,
391
- "isESM": false,
454
+ "isESM": true,
392
455
  "relativePath": [
393
456
  "src",
394
457
  "commands",
395
- "api",
458
+ "domain",
396
459
  "setdefault.js"
397
460
  ]
398
461
  },
399
- "api:unpublish": {
462
+ "domain:unpublish": {
400
463
  "aliases": [],
401
464
  "args": {
402
- "OWNER/API_NAME/VERSION": {
403
- "description": "API identifier",
404
- "name": "OWNER/API_NAME/VERSION",
465
+ "OWNER/DOMAIN_NAME/VERSION": {
466
+ "description": "Domain to unpublish on Swagger",
467
+ "name": "OWNER/DOMAIN_NAME/VERSION",
405
468
  "required": true
406
469
  }
407
470
  },
408
- "description": "unpublish an API version",
471
+ "description": "unpublish a domain version",
409
472
  "examples": [
410
- "swaggerhub api:unpublish organization/api/1.0.0"
473
+ "swaggerhub domain:unpublish organization/domain/1.0.0"
411
474
  ],
412
475
  "flags": {
413
476
  "help": {
@@ -420,41 +483,41 @@
420
483
  },
421
484
  "hasDynamicHelp": false,
422
485
  "hiddenAliases": [],
423
- "id": "api:unpublish",
486
+ "id": "domain:unpublish",
424
487
  "pluginAlias": "swaggerhub-cli",
425
488
  "pluginName": "swaggerhub-cli",
426
489
  "pluginType": "core",
427
490
  "strict": true,
428
- "isESM": false,
491
+ "isESM": true,
429
492
  "relativePath": [
430
493
  "src",
431
494
  "commands",
432
- "api",
495
+ "domain",
433
496
  "unpublish.js"
434
497
  ]
435
498
  },
436
- "api:update": {
499
+ "domain:update": {
437
500
  "aliases": [],
438
501
  "args": {
439
- "OWNER/API_NAME/[VERSION]": {
440
- "description": "API to update on Swagger",
441
- "name": "OWNER/API_NAME/[VERSION]",
502
+ "OWNER/DOMAIN_NAME/[VERSION]": {
503
+ "description": "Domain to update on Swagger",
504
+ "name": "OWNER/DOMAIN_NAME/[VERSION]",
442
505
  "required": true
443
506
  }
444
507
  },
445
- "description": "update an API\nThe API version from the file will be used unless the version is specified in the command argument.\nWhen no file is specified then the default API version will be updated.\nThe API visibility can be changed by using the --visibility flag.\n",
508
+ "description": "update a domain\nThe domain version from the file will be used unless the version is specified in the command argument.\nWhen no file is specified then the default domain version will be updated.\nThe domain visibility can be changed by using the --visibility flag.\n",
446
509
  "examples": [
447
- "swaggerhub api:update organization/api --file api.yaml",
448
- "swaggerhub api:update organization/api/1.0.0 --file api.json",
449
- "swaggerhub api:update organization/api/1.0.0 --published=publish --file api.json",
450
- "swaggerhub api:update organization/api/1.0.0 --setdefault --file api.json",
451
- "swaggerhub api:update organization/api/1.0.0 --published=unpublish --setdefault --file api.json",
452
- "swaggerhub api:update organization/api/1.0.0 --visibility=private"
510
+ "swaggerhub domain:update organization/domain --file domain.yaml",
511
+ "swaggerhub domain:update organization/domain/1.0.0 --file domain.json",
512
+ "swaggerhub domain:update organization/domain/1.0.0 --published=publish --file domain.json",
513
+ "swaggerhub domain:update organization/domain/1.0.0 --setdefault --file domain.json",
514
+ "swaggerhub domain:update organization/domain/1.0.0 --published=unpublish --setdefault --file domain.json",
515
+ "swaggerhub domain:update organization/domain/1.0.0 --visibility=private"
453
516
  ],
454
517
  "flags": {
455
518
  "file": {
456
519
  "char": "f",
457
- "description": "file location of API to update",
520
+ "description": "file location of domain to update",
458
521
  "name": "file",
459
522
  "required": false,
460
523
  "hasDynamicHelp": false,
@@ -462,7 +525,7 @@
462
525
  "type": "option"
463
526
  },
464
527
  "visibility": {
465
- "description": "visibility of API in Swagger",
528
+ "description": "visibility of domain in Swagger",
466
529
  "name": "visibility",
467
530
  "hasDynamicHelp": false,
468
531
  "multiple": false,
@@ -473,7 +536,7 @@
473
536
  "type": "option"
474
537
  },
475
538
  "published": {
476
- "description": "sets the lifecycle setting of the API version",
539
+ "description": "sets the lifecycle setting of the domain version",
477
540
  "name": "published",
478
541
  "required": false,
479
542
  "hasDynamicHelp": false,
@@ -485,7 +548,7 @@
485
548
  "type": "option"
486
549
  },
487
550
  "setdefault": {
488
- "description": "sets API version to be the default",
551
+ "description": "sets domain version to be the default",
489
552
  "name": "setdefault",
490
553
  "required": false,
491
554
  "allowNo": false,
@@ -501,48 +564,40 @@
501
564
  },
502
565
  "hasDynamicHelp": false,
503
566
  "hiddenAliases": [],
504
- "id": "api:update",
567
+ "id": "domain:update",
505
568
  "pluginAlias": "swaggerhub-cli",
506
569
  "pluginName": "swaggerhub-cli",
507
570
  "pluginType": "core",
508
571
  "strict": true,
509
- "isESM": false,
572
+ "isESM": true,
510
573
  "relativePath": [
511
574
  "src",
512
575
  "commands",
513
- "api",
576
+ "domain",
514
577
  "update.js"
515
578
  ]
516
579
  },
517
- "domain:clone": {
580
+ "integration:create": {
518
581
  "aliases": [],
519
582
  "args": {
520
- "OWNER/DOMAIN_NAME/VERSION": {
521
- "description": "Domain version to clone",
522
- "name": "OWNER/DOMAIN_NAME/VERSION",
523
- "required": true
524
- },
525
- "NEW_VERSION": {
526
- "description": "Version identifier of the new domain version",
527
- "name": "NEW_VERSION",
583
+ "OWNER/API_NAME/[VERSION]": {
584
+ "description": "API to add integration to on Swagger",
585
+ "name": "OWNER/API_NAME/[VERSION]",
528
586
  "required": true
529
587
  }
530
588
  },
531
- "description": "clone a domain version as a new version",
589
+ "description": "creates a new API integration from a JSON configuration file.\nSee the documentation for configuration files: https://github.com/SmartBear/swaggerhub-cli/tree/main/examples/integrations\nWhen VERSION is not included in the argument, the integration will be added to the default API version.\n",
532
590
  "examples": [
533
- "swaggerhub domain:clone organization/domain/1.0.0 1.0.1",
534
- "swaggerhub domain:clone organization/domain/1.0.0 1.0.1 --visibility public"
591
+ "swaggerhub integration:create organization/api/1.0.0 --file config.json"
535
592
  ],
536
593
  "flags": {
537
- "visibility": {
538
- "description": "visibility of the new version (defaults to the server setting)",
539
- "name": "visibility",
594
+ "file": {
595
+ "char": "f",
596
+ "description": "location of integration configuration file",
597
+ "name": "file",
598
+ "required": true,
540
599
  "hasDynamicHelp": false,
541
600
  "multiple": false,
542
- "options": [
543
- "public",
544
- "private"
545
- ],
546
601
  "type": "option"
547
602
  },
548
603
  "help": {
@@ -555,85 +610,34 @@
555
610
  },
556
611
  "hasDynamicHelp": false,
557
612
  "hiddenAliases": [],
558
- "id": "domain:clone",
613
+ "id": "integration:create",
559
614
  "pluginAlias": "swaggerhub-cli",
560
615
  "pluginName": "swaggerhub-cli",
561
616
  "pluginType": "core",
562
617
  "strict": true,
563
618
  "enableJsonFlag": false,
564
- "isESM": false,
619
+ "isESM": true,
565
620
  "relativePath": [
566
621
  "src",
567
622
  "commands",
568
- "domain",
569
- "clone.js"
623
+ "integration",
624
+ "create.js"
570
625
  ]
571
626
  },
572
- "domain:create": {
627
+ "integration:delete": {
573
628
  "aliases": [],
574
629
  "args": {
575
- "OWNER/DOMAIN_NAME/[VERSION]": {
576
- "description": "Domain to create on Swagger",
577
- "name": "OWNER/DOMAIN_NAME/[VERSION]",
630
+ "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
631
+ "description": "Integration to delete for given API on Swagger",
632
+ "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
578
633
  "required": true
579
634
  }
580
635
  },
581
- "description": "creates a new domain / domain version from a YAML/JSON file\nThe domain version from the file will be used unless the version is specified in the command argument.\nAn error will occur if the domain version already exists.\n",
636
+ "description": "deletes the integration from the given API.",
582
637
  "examples": [
583
- "swaggerhub domain:create organization/domain/1.0.0 --file domain.yaml --visibility public",
584
- "swaggerhub domain:create organization/domain --file domain.yaml",
585
- "swaggerhub domain:create organization/domain/1.0.0 --published=publish --file domain.json",
586
- "swaggerhub domain:create organization/domain/1.0.0 --setdefault --file domain.json",
587
- "swaggerhub domain:create organization/domain/1.0.0 --published=publish --setdefault --file domain.json"
638
+ "swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
588
639
  ],
589
640
  "flags": {
590
- "file": {
591
- "char": "f",
592
- "description": "file location of domain to create",
593
- "name": "file",
594
- "required": true,
595
- "hasDynamicHelp": false,
596
- "multiple": false,
597
- "type": "option"
598
- },
599
- "visibility": {
600
- "description": "visibility of domain in Swagger",
601
- "name": "visibility",
602
- "default": "private",
603
- "hasDynamicHelp": false,
604
- "multiple": false,
605
- "options": [
606
- "public",
607
- "private"
608
- ],
609
- "type": "option"
610
- },
611
- "published": {
612
- "dependsOn": [
613
- "file"
614
- ],
615
- "description": "sets the lifecycle setting of the domain version",
616
- "name": "published",
617
- "required": false,
618
- "default": "unpublish",
619
- "hasDynamicHelp": false,
620
- "multiple": false,
621
- "options": [
622
- "publish",
623
- "unpublish"
624
- ],
625
- "type": "option"
626
- },
627
- "setdefault": {
628
- "dependsOn": [
629
- "file"
630
- ],
631
- "description": "sets domain version to be the default",
632
- "name": "setdefault",
633
- "required": false,
634
- "allowNo": false,
635
- "type": "boolean"
636
- },
637
641
  "help": {
638
642
  "char": "h",
639
643
  "description": "Show CLI help.",
@@ -644,42 +648,34 @@
644
648
  },
645
649
  "hasDynamicHelp": false,
646
650
  "hiddenAliases": [],
647
- "id": "domain:create",
651
+ "id": "integration:delete",
648
652
  "pluginAlias": "swaggerhub-cli",
649
653
  "pluginName": "swaggerhub-cli",
650
654
  "pluginType": "core",
651
655
  "strict": true,
652
- "isESM": false,
656
+ "enableJsonFlag": false,
657
+ "isESM": true,
653
658
  "relativePath": [
654
659
  "src",
655
660
  "commands",
656
- "domain",
657
- "create.js"
661
+ "integration",
662
+ "delete.js"
658
663
  ]
659
664
  },
660
- "domain:delete": {
665
+ "integration:execute": {
661
666
  "aliases": [],
662
667
  "args": {
663
- "OWNER/DOMAIN_NAME/[VERSION]": {
664
- "description": "Domain to delete on Swagger",
665
- "name": "OWNER/DOMAIN_NAME/[VERSION]",
668
+ "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
669
+ "description": "Integration to execute for given API on Swagger",
670
+ "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
666
671
  "required": true
667
672
  }
668
673
  },
669
- "description": "delete a domain or domain version\n",
674
+ "description": "executes an integration for the given API.",
670
675
  "examples": [
671
- "swaggerhub domain:delete organization/domain/1.0.0",
672
- "swaggerhub domain:delete organization/domain",
673
- "swaggerhub domain:delete organization/domain --force"
676
+ "swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
674
677
  ],
675
678
  "flags": {
676
- "force": {
677
- "char": "f",
678
- "description": "delete domain without prompting for confirmation",
679
- "name": "force",
680
- "allowNo": false,
681
- "type": "boolean"
682
- },
683
679
  "help": {
684
680
  "char": "h",
685
681
  "description": "Show CLI help.",
@@ -690,42 +686,34 @@
690
686
  },
691
687
  "hasDynamicHelp": false,
692
688
  "hiddenAliases": [],
693
- "id": "domain:delete",
689
+ "id": "integration:execute",
694
690
  "pluginAlias": "swaggerhub-cli",
695
691
  "pluginName": "swaggerhub-cli",
696
692
  "pluginType": "core",
697
693
  "strict": true,
698
694
  "enableJsonFlag": false,
699
- "isESM": false,
695
+ "isESM": true,
700
696
  "relativePath": [
701
697
  "src",
702
698
  "commands",
703
- "domain",
704
- "delete.js"
699
+ "integration",
700
+ "execute.js"
705
701
  ]
706
702
  },
707
- "domain:get": {
703
+ "integration:get": {
708
704
  "aliases": [],
709
705
  "args": {
710
- "OWNER/DOMAIN_NAME/[VERSION]": {
711
- "description": "Domain to fetch from Swagger",
712
- "name": "OWNER/DOMAIN_NAME/[VERSION]",
706
+ "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
707
+ "description": "Integration to fetch for given API on Swagger",
708
+ "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
713
709
  "required": true
714
710
  }
715
711
  },
716
- "description": "fetches a domain definition\nWhen VERSION is not included in the argument, the default version will be returned.\nReturns the domain in YAML format by default.\n",
712
+ "description": "retrieves an integration for the given API.",
717
713
  "examples": [
718
- "swaggerhub domain:get organization/domain",
719
- "swaggerhub domain:get organization/domain/1.0.0 --json"
714
+ "swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
720
715
  ],
721
716
  "flags": {
722
- "json": {
723
- "char": "j",
724
- "description": "returns the domain in JSON format.",
725
- "name": "json",
726
- "allowNo": false,
727
- "type": "boolean"
728
- },
729
717
  "help": {
730
718
  "char": "h",
731
719
  "description": "Show CLI help.",
@@ -736,42 +724,34 @@
736
724
  },
737
725
  "hasDynamicHelp": false,
738
726
  "hiddenAliases": [],
739
- "id": "domain:get",
727
+ "id": "integration:get",
740
728
  "pluginAlias": "swaggerhub-cli",
741
729
  "pluginName": "swaggerhub-cli",
742
730
  "pluginType": "core",
743
731
  "strict": true,
744
732
  "enableJsonFlag": false,
745
- "isESM": false,
733
+ "isESM": true,
746
734
  "relativePath": [
747
735
  "src",
748
736
  "commands",
749
- "domain",
737
+ "integration",
750
738
  "get.js"
751
739
  ]
752
740
  },
753
- "domain:publish": {
741
+ "integration:list": {
754
742
  "aliases": [],
755
743
  "args": {
756
- "OWNER/DOMAIN_NAME/VERSION": {
757
- "description": "Domain to publish on Swagger",
758
- "name": "OWNER/DOMAIN_NAME/VERSION",
744
+ "OWNER/API_NAME/[VERSION]": {
745
+ "description": "API to list integrations for",
746
+ "name": "OWNER/API_NAME/[VERSION]",
759
747
  "required": true
760
748
  }
761
749
  },
762
- "description": "publish a domain version",
750
+ "description": "list integrations on an API.",
763
751
  "examples": [
764
- "swaggerhub domain:publish organization/domain/1.0.0",
765
- "swaggerhub domain:publish organization/domain/1.0.0 --force"
752
+ "swaggerhub integration:list organization/api/1.0.0"
766
753
  ],
767
754
  "flags": {
768
- "force": {
769
- "char": "f",
770
- "description": "publish domain without prompting for confirmation",
771
- "name": "force",
772
- "allowNo": false,
773
- "type": "boolean"
774
- },
775
755
  "help": {
776
756
  "char": "h",
777
757
  "description": "Show CLI help.",
@@ -782,45 +762,42 @@
782
762
  },
783
763
  "hasDynamicHelp": false,
784
764
  "hiddenAliases": [],
785
- "id": "domain:publish",
765
+ "id": "integration:list",
786
766
  "pluginAlias": "swaggerhub-cli",
787
767
  "pluginName": "swaggerhub-cli",
788
768
  "pluginType": "core",
789
769
  "strict": true,
790
- "isESM": false,
770
+ "enableJsonFlag": false,
771
+ "isESM": true,
791
772
  "relativePath": [
792
773
  "src",
793
774
  "commands",
794
- "domain",
795
- "publish.js"
775
+ "integration",
776
+ "list.js"
796
777
  ]
797
778
  },
798
- "domain:rename": {
779
+ "integration:update": {
799
780
  "aliases": [],
800
781
  "args": {
801
- "OWNER/DOMAIN_NAME": {
802
- "description": "Domain to be renamed",
803
- "name": "OWNER/DOMAIN_NAME",
804
- "required": true
805
- },
806
- "DOMAIN_NEW_NAME": {
807
- "description": "New name for the domain",
808
- "name": "DOMAIN_NEW_NAME",
782
+ "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
783
+ "description": "Integration to update for given API on Swagger",
784
+ "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
809
785
  "required": true
810
786
  }
811
787
  },
812
- "description": "rename a domain",
788
+ "description": "update the configuration of an API integration.",
813
789
  "examples": [
814
- "swaggerhub domain:rename organization/domainOldName domainNewName",
815
- "swaggerhub domain:rename organization/domainOldName domainNewName --force"
790
+ "swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json"
816
791
  ],
817
792
  "flags": {
818
- "force": {
793
+ "file": {
819
794
  "char": "f",
820
- "description": "rename the domain even if it is referenced by APIs or other domains",
821
- "name": "force",
822
- "allowNo": false,
823
- "type": "boolean"
795
+ "description": "location of integration configuration file",
796
+ "name": "file",
797
+ "required": true,
798
+ "hasDynamicHelp": false,
799
+ "multiple": false,
800
+ "type": "option"
824
801
  },
825
802
  "help": {
826
803
  "char": "h",
@@ -832,152 +809,65 @@
832
809
  },
833
810
  "hasDynamicHelp": false,
834
811
  "hiddenAliases": [],
835
- "id": "domain:rename",
812
+ "id": "integration:update",
836
813
  "pluginAlias": "swaggerhub-cli",
837
814
  "pluginName": "swaggerhub-cli",
838
815
  "pluginType": "core",
839
816
  "strict": true,
840
817
  "enableJsonFlag": false,
841
- "isESM": false,
818
+ "isESM": true,
842
819
  "relativePath": [
843
820
  "src",
844
821
  "commands",
845
- "domain",
846
- "rename.js"
822
+ "integration",
823
+ "update.js"
847
824
  ]
848
825
  },
849
- "domain:setdefault": {
826
+ "project:create": {
850
827
  "aliases": [],
851
828
  "args": {
852
- "OWNER/DOMAIN_NAME/VERSION": {
853
- "description": "Domain to set as default on Swagger",
854
- "name": "OWNER/DOMAIN_NAME/VERSION",
829
+ "OWNER/PROJECT_NAME": {
830
+ "description": "The new project to create on Swagger",
831
+ "name": "OWNER/PROJECT_NAME",
855
832
  "required": true
856
833
  }
857
834
  },
858
- "description": "set the default version of a domain",
835
+ "description": "Creates a new project in Swagger.",
859
836
  "examples": [
860
- "swaggerhub domain:setdefault organization/domain/2.0.0"
837
+ "swaggerhub project:create organization/new_project_name --description \"project description\"",
838
+ "swaggerhub project:create organization/new_project_name -a \"testapi1,testapi2\"",
839
+ "swaggerhub project:create organization/new_project_name --apis \"testapi1,testapi2\"",
840
+ "swaggerhub project:create organization/new_project_name -d \"testdomain3,testdomain4\"",
841
+ "swaggerhub project:create organization/new_project_name --domains \"testdomain3,testdomain4\"",
842
+ "swaggerhub project:create organization/new_project_name -a \"testapi1\" -d \"testdomain3\" --description \"description\""
861
843
  ],
862
844
  "flags": {
863
- "help": {
864
- "char": "h",
865
- "description": "Show CLI help.",
866
- "name": "help",
867
- "allowNo": false,
868
- "type": "boolean"
869
- }
870
- },
871
- "hasDynamicHelp": false,
872
- "hiddenAliases": [],
873
- "id": "domain:setdefault",
874
- "pluginAlias": "swaggerhub-cli",
875
- "pluginName": "swaggerhub-cli",
876
- "pluginType": "core",
877
- "strict": true,
878
- "isESM": false,
879
- "relativePath": [
880
- "src",
881
- "commands",
882
- "domain",
883
- "setdefault.js"
884
- ]
885
- },
886
- "domain:unpublish": {
887
- "aliases": [],
888
- "args": {
889
- "OWNER/DOMAIN_NAME/VERSION": {
890
- "description": "Domain to unpublish on Swagger",
891
- "name": "OWNER/DOMAIN_NAME/VERSION",
892
- "required": true
893
- }
894
- },
895
- "description": "unpublish a domain version",
896
- "examples": [
897
- "swaggerhub domain:unpublish organization/domain/1.0.0"
898
- ],
899
- "flags": {
900
- "help": {
901
- "char": "h",
902
- "description": "Show CLI help.",
903
- "name": "help",
904
- "allowNo": false,
905
- "type": "boolean"
906
- }
907
- },
908
- "hasDynamicHelp": false,
909
- "hiddenAliases": [],
910
- "id": "domain:unpublish",
911
- "pluginAlias": "swaggerhub-cli",
912
- "pluginName": "swaggerhub-cli",
913
- "pluginType": "core",
914
- "strict": true,
915
- "isESM": false,
916
- "relativePath": [
917
- "src",
918
- "commands",
919
- "domain",
920
- "unpublish.js"
921
- ]
922
- },
923
- "domain:update": {
924
- "aliases": [],
925
- "args": {
926
- "OWNER/DOMAIN_NAME/[VERSION]": {
927
- "description": "Domain to update on Swagger",
928
- "name": "OWNER/DOMAIN_NAME/[VERSION]",
929
- "required": true
930
- }
931
- },
932
- "description": "update a domain\nThe domain version from the file will be used unless the version is specified in the command argument.\nWhen no file is specified then the default domain version will be updated.\nThe domain visibility can be changed by using the --visibility flag.\n",
933
- "examples": [
934
- "swaggerhub domain:update organization/domain --file domain.yaml",
935
- "swaggerhub domain:update organization/domain/1.0.0 --file domain.json",
936
- "swaggerhub domain:update organization/domain/1.0.0 --published=publish --file domain.json",
937
- "swaggerhub domain:update organization/domain/1.0.0 --setdefault --file domain.json",
938
- "swaggerhub domain:update organization/domain/1.0.0 --published=unpublish --setdefault --file domain.json",
939
- "swaggerhub domain:update organization/domain/1.0.0 --visibility=private"
940
- ],
941
- "flags": {
942
- "file": {
943
- "char": "f",
944
- "description": "file location of domain to update",
945
- "name": "file",
845
+ "description": {
846
+ "description": "Description of project",
847
+ "name": "description",
946
848
  "required": false,
947
849
  "hasDynamicHelp": false,
948
850
  "multiple": false,
949
851
  "type": "option"
950
852
  },
951
- "visibility": {
952
- "description": "visibility of domain in Swagger",
953
- "name": "visibility",
853
+ "apis": {
854
+ "char": "a",
855
+ "description": "Comma-separated list of API names to include in project",
856
+ "name": "apis",
857
+ "required": false,
954
858
  "hasDynamicHelp": false,
955
859
  "multiple": false,
956
- "options": [
957
- "public",
958
- "private"
959
- ],
960
860
  "type": "option"
961
861
  },
962
- "published": {
963
- "description": "sets the lifecycle setting of the domain version",
964
- "name": "published",
862
+ "domains": {
863
+ "char": "d",
864
+ "description": "Comma-separated list of domain names to include in project",
865
+ "name": "domains",
965
866
  "required": false,
966
867
  "hasDynamicHelp": false,
967
868
  "multiple": false,
968
- "options": [
969
- "publish",
970
- "unpublish"
971
- ],
972
869
  "type": "option"
973
870
  },
974
- "setdefault": {
975
- "description": "sets domain version to be the default",
976
- "name": "setdefault",
977
- "required": false,
978
- "allowNo": false,
979
- "type": "boolean"
980
- },
981
871
  "help": {
982
872
  "char": "h",
983
873
  "description": "Show CLI help.",
@@ -988,42 +878,34 @@
988
878
  },
989
879
  "hasDynamicHelp": false,
990
880
  "hiddenAliases": [],
991
- "id": "domain:update",
881
+ "id": "project:create",
992
882
  "pluginAlias": "swaggerhub-cli",
993
883
  "pluginName": "swaggerhub-cli",
994
884
  "pluginType": "core",
995
885
  "strict": true,
996
- "isESM": false,
886
+ "enableJsonFlag": false,
887
+ "isESM": true,
997
888
  "relativePath": [
998
889
  "src",
999
890
  "commands",
1000
- "domain",
1001
- "update.js"
891
+ "project",
892
+ "create.js"
1002
893
  ]
1003
894
  },
1004
- "integration:create": {
895
+ "project:delete": {
1005
896
  "aliases": [],
1006
897
  "args": {
1007
- "OWNER/API_NAME/[VERSION]": {
1008
- "description": "API to add integration to on Swagger",
1009
- "name": "OWNER/API_NAME/[VERSION]",
898
+ "OWNER/PROJECT_NAME": {
899
+ "description": "The project to delete on Swagger",
900
+ "name": "OWNER/PROJECT_NAME",
1010
901
  "required": true
1011
902
  }
1012
903
  },
1013
- "description": "creates a new API integration from a JSON configuration file.\nSee the documentation for configuration files: https://github.com/SmartBear/swaggerhub-cli/tree/main/examples/integrations\nWhen VERSION is not included in the argument, the integration will be added to the default API version.\n",
904
+ "description": "Deletes a project from Swagger.",
1014
905
  "examples": [
1015
- "swaggerhub integration:create organization/api/1.0.0 --file config.json"
906
+ "swaggerhub project:delete organization/project_name"
1016
907
  ],
1017
908
  "flags": {
1018
- "file": {
1019
- "char": "f",
1020
- "description": "location of integration configuration file",
1021
- "name": "file",
1022
- "required": true,
1023
- "hasDynamicHelp": false,
1024
- "multiple": false,
1025
- "type": "option"
1026
- },
1027
909
  "help": {
1028
910
  "char": "h",
1029
911
  "description": "Show CLI help.",
@@ -1034,32 +916,32 @@
1034
916
  },
1035
917
  "hasDynamicHelp": false,
1036
918
  "hiddenAliases": [],
1037
- "id": "integration:create",
919
+ "id": "project:delete",
1038
920
  "pluginAlias": "swaggerhub-cli",
1039
921
  "pluginName": "swaggerhub-cli",
1040
922
  "pluginType": "core",
1041
923
  "strict": true,
1042
924
  "enableJsonFlag": false,
1043
- "isESM": false,
925
+ "isESM": true,
1044
926
  "relativePath": [
1045
927
  "src",
1046
928
  "commands",
1047
- "integration",
1048
- "create.js"
929
+ "project",
930
+ "delete.js"
1049
931
  ]
1050
932
  },
1051
- "integration:delete": {
933
+ "project:get": {
1052
934
  "aliases": [],
1053
935
  "args": {
1054
- "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
1055
- "description": "Integration to delete for given API on Swagger",
1056
- "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
936
+ "OWNER/PROJECT_NAME": {
937
+ "description": "The project to get details for on Swagger",
938
+ "name": "OWNER/PROJECT_NAME",
1057
939
  "required": true
1058
940
  }
1059
941
  },
1060
- "description": "deletes the integration from the given API.",
942
+ "description": "Retrieves the details for a project.",
1061
943
  "examples": [
1062
- "swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
944
+ "swaggerhub project:get organization/project_name"
1063
945
  ],
1064
946
  "flags": {
1065
947
  "help": {
@@ -1072,32 +954,35 @@
1072
954
  },
1073
955
  "hasDynamicHelp": false,
1074
956
  "hiddenAliases": [],
1075
- "id": "integration:delete",
957
+ "id": "project:get",
1076
958
  "pluginAlias": "swaggerhub-cli",
1077
959
  "pluginName": "swaggerhub-cli",
1078
960
  "pluginType": "core",
1079
961
  "strict": true,
1080
962
  "enableJsonFlag": false,
1081
- "isESM": false,
963
+ "isESM": true,
1082
964
  "relativePath": [
1083
965
  "src",
1084
966
  "commands",
1085
- "integration",
1086
- "delete.js"
967
+ "project",
968
+ "get.js"
1087
969
  ]
1088
970
  },
1089
- "integration:execute": {
971
+ "project:list": {
1090
972
  "aliases": [],
1091
973
  "args": {
1092
- "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
1093
- "description": "Integration to execute for given API on Swagger",
1094
- "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
1095
- "required": true
974
+ "OWNER": {
975
+ "description": "The organization to list projects for on Swagger",
976
+ "name": "OWNER",
977
+ "required": false
1096
978
  }
1097
979
  },
1098
- "description": "executes an integration for the given API.",
980
+ "description": "list projects",
1099
981
  "examples": [
1100
- "swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
982
+ "swaggerhub project:list",
983
+ "swaggerhub project:list organization",
984
+ "swaggerhub project:list organization --limit 20 --order DESC",
985
+ "swaggerhub project:list organization --page 2 --limit 20"
1101
986
  ],
1102
987
  "flags": {
1103
988
  "help": {
@@ -1106,36 +991,67 @@
1106
991
  "name": "help",
1107
992
  "allowNo": false,
1108
993
  "type": "boolean"
994
+ },
995
+ "limit": {
996
+ "char": "l",
997
+ "description": "number of projects per page (1-100)",
998
+ "name": "limit",
999
+ "hasDynamicHelp": false,
1000
+ "multiple": false,
1001
+ "type": "option"
1002
+ },
1003
+ "page": {
1004
+ "description": "zero-based page of projects to return",
1005
+ "name": "page",
1006
+ "hasDynamicHelp": false,
1007
+ "multiple": false,
1008
+ "type": "option"
1009
+ },
1010
+ "order": {
1011
+ "description": "sort order of the projects",
1012
+ "name": "order",
1013
+ "hasDynamicHelp": false,
1014
+ "multiple": false,
1015
+ "options": [
1016
+ "ASC",
1017
+ "DESC"
1018
+ ],
1019
+ "type": "option"
1109
1020
  }
1110
1021
  },
1111
1022
  "hasDynamicHelp": false,
1112
1023
  "hiddenAliases": [],
1113
- "id": "integration:execute",
1024
+ "id": "project:list",
1114
1025
  "pluginAlias": "swaggerhub-cli",
1115
1026
  "pluginName": "swaggerhub-cli",
1116
1027
  "pluginType": "core",
1117
1028
  "strict": true,
1118
1029
  "enableJsonFlag": false,
1119
- "isESM": false,
1030
+ "isESM": true,
1120
1031
  "relativePath": [
1121
1032
  "src",
1122
1033
  "commands",
1123
- "integration",
1124
- "execute.js"
1034
+ "project",
1035
+ "list.js"
1125
1036
  ]
1126
1037
  },
1127
- "integration:get": {
1038
+ "spectral:download": {
1128
1039
  "aliases": [],
1129
1040
  "args": {
1130
- "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
1131
- "description": "Integration to fetch for given API on Swagger",
1132
- "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
1041
+ "OWNER/RULESET_NAME": {
1042
+ "description": "Organization's Spectral ruleset to create or update on Swagger",
1043
+ "name": "OWNER/RULESET_NAME",
1044
+ "required": true
1045
+ },
1046
+ "directory": {
1047
+ "description": "Relative path to directory the ruleset files should be saved to",
1048
+ "name": "directory",
1133
1049
  "required": true
1134
1050
  }
1135
1051
  },
1136
- "description": "retrieves an integration for the given API.",
1052
+ "description": "Fetch organization's Spectral ruleset",
1137
1053
  "examples": [
1138
- "swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
1054
+ "swaggerhub spectral:download my_organization/my_api_ruleset rules/"
1139
1055
  ],
1140
1056
  "flags": {
1141
1057
  "help": {
@@ -1148,32 +1064,37 @@
1148
1064
  },
1149
1065
  "hasDynamicHelp": false,
1150
1066
  "hiddenAliases": [],
1151
- "id": "integration:get",
1067
+ "id": "spectral:download",
1152
1068
  "pluginAlias": "swaggerhub-cli",
1153
1069
  "pluginName": "swaggerhub-cli",
1154
1070
  "pluginType": "core",
1155
1071
  "strict": true,
1156
1072
  "enableJsonFlag": false,
1157
- "isESM": false,
1073
+ "isESM": true,
1158
1074
  "relativePath": [
1159
1075
  "src",
1160
1076
  "commands",
1161
- "integration",
1162
- "get.js"
1077
+ "spectral",
1078
+ "download.js"
1163
1079
  ]
1164
1080
  },
1165
- "integration:list": {
1081
+ "spectral:upload": {
1166
1082
  "aliases": [],
1167
1083
  "args": {
1168
- "OWNER/API_NAME/[VERSION]": {
1169
- "description": "API to list integrations for",
1170
- "name": "OWNER/API_NAME/[VERSION]",
1084
+ "OWNER/RULESET_NAME": {
1085
+ "description": "Organization's Spectral ruleset to create or update on Swagger",
1086
+ "name": "OWNER/RULESET_NAME",
1087
+ "required": true
1088
+ },
1089
+ "directory": {
1090
+ "description": "Relative path to directory with ruleset files",
1091
+ "name": "directory",
1171
1092
  "required": true
1172
1093
  }
1173
1094
  },
1174
- "description": "list integrations on an API.",
1095
+ "description": "Create or update organization's Spectral ruleset",
1175
1096
  "examples": [
1176
- "swaggerhub integration:list organization/api/1.0.0"
1097
+ "swaggerhub spectral:upload my_organization/my_api_ruleset rules/"
1177
1098
  ],
1178
1099
  "flags": {
1179
1100
  "help": {
@@ -1186,41 +1107,49 @@
1186
1107
  },
1187
1108
  "hasDynamicHelp": false,
1188
1109
  "hiddenAliases": [],
1189
- "id": "integration:list",
1110
+ "id": "spectral:upload",
1190
1111
  "pluginAlias": "swaggerhub-cli",
1191
1112
  "pluginName": "swaggerhub-cli",
1192
1113
  "pluginType": "core",
1193
1114
  "strict": true,
1194
1115
  "enableJsonFlag": false,
1195
- "isESM": false,
1116
+ "isESM": true,
1196
1117
  "relativePath": [
1197
1118
  "src",
1198
1119
  "commands",
1199
- "integration",
1200
- "list.js"
1120
+ "spectral",
1121
+ "upload.js"
1201
1122
  ]
1202
1123
  },
1203
- "integration:update": {
1124
+ "api:clone": {
1204
1125
  "aliases": [],
1205
1126
  "args": {
1206
- "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
1207
- "description": "Integration to update for given API on Swagger",
1208
- "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
1127
+ "OWNER/API_NAME/VERSION": {
1128
+ "description": "API version to clone",
1129
+ "name": "OWNER/API_NAME/VERSION",
1130
+ "required": true
1131
+ },
1132
+ "NEW_VERSION": {
1133
+ "description": "Version identifier of the new API version",
1134
+ "name": "NEW_VERSION",
1209
1135
  "required": true
1210
1136
  }
1211
1137
  },
1212
- "description": "update the configuration of an API integration.",
1138
+ "description": "clone an API version as a new version",
1213
1139
  "examples": [
1214
- "swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json"
1140
+ "swaggerhub api:clone organization/api/1.0.0 1.0.1",
1141
+ "swaggerhub api:clone organization/api/1.0.0 1.0.1 --visibility public"
1215
1142
  ],
1216
1143
  "flags": {
1217
- "file": {
1218
- "char": "f",
1219
- "description": "location of integration configuration file",
1220
- "name": "file",
1221
- "required": true,
1144
+ "visibility": {
1145
+ "description": "visibility of the new version (defaults to the server setting)",
1146
+ "name": "visibility",
1222
1147
  "hasDynamicHelp": false,
1223
1148
  "multiple": false,
1149
+ "options": [
1150
+ "public",
1151
+ "private"
1152
+ ],
1224
1153
  "type": "option"
1225
1154
  },
1226
1155
  "help": {
@@ -1233,65 +1162,85 @@
1233
1162
  },
1234
1163
  "hasDynamicHelp": false,
1235
1164
  "hiddenAliases": [],
1236
- "id": "integration:update",
1165
+ "id": "api:clone",
1237
1166
  "pluginAlias": "swaggerhub-cli",
1238
1167
  "pluginName": "swaggerhub-cli",
1239
1168
  "pluginType": "core",
1240
1169
  "strict": true,
1241
1170
  "enableJsonFlag": false,
1242
- "isESM": false,
1171
+ "isESM": true,
1243
1172
  "relativePath": [
1244
1173
  "src",
1245
1174
  "commands",
1246
- "integration",
1247
- "update.js"
1175
+ "api",
1176
+ "clone.js"
1248
1177
  ]
1249
1178
  },
1250
- "project:create": {
1179
+ "api:create": {
1251
1180
  "aliases": [],
1252
1181
  "args": {
1253
- "OWNER/PROJECT_NAME": {
1254
- "description": "The new project to create on Swagger",
1255
- "name": "OWNER/PROJECT_NAME",
1182
+ "OWNER/API_NAME/[VERSION]": {
1183
+ "description": "API to create on Swagger",
1184
+ "name": "OWNER/API_NAME/[VERSION]",
1256
1185
  "required": true
1257
1186
  }
1258
1187
  },
1259
- "description": "Creates a new project in Swagger.",
1188
+ "description": "creates a new API / API version from a YAML/JSON file\nThe API version from the file will be used unless the version is specified in the command argument.\nAn error will occur if the API version already exists.\n",
1260
1189
  "examples": [
1261
- "swaggerhub project:create organization/new_project_name --description \"project description\"",
1262
- "swaggerhub project:create organization/new_project_name -a \"testapi1,testapi2\"",
1263
- "swaggerhub project:create organization/new_project_name --apis \"testapi1,testapi2\"",
1264
- "swaggerhub project:create organization/new_project_name -d \"testdomain3,testdomain4\"",
1265
- "swaggerhub project:create organization/new_project_name --domains \"testdomain3,testdomain4\"",
1266
- "swaggerhub project:create organization/new_project_name -a \"testapi1\" -d \"testdomain3\" --description \"description\""
1190
+ "swaggerhub api:create organization/api/1.0.0 --file api.yaml --visibility public",
1191
+ "swaggerhub api:create organization/api --file api.yaml",
1192
+ "swaggerhub api:create organization/api/1.0.0 --published=publish --file api.json",
1193
+ "swaggerhub api:create organization/api/1.0.0 --setdefault --file api.json",
1194
+ "swaggerhub api:create organization/api/1.0.0 --published=publish --setdefault --file api.json"
1267
1195
  ],
1268
1196
  "flags": {
1269
- "description": {
1270
- "description": "Description of project",
1271
- "name": "description",
1272
- "required": false,
1197
+ "file": {
1198
+ "char": "f",
1199
+ "description": "file location of API to create",
1200
+ "name": "file",
1201
+ "required": true,
1273
1202
  "hasDynamicHelp": false,
1274
1203
  "multiple": false,
1275
1204
  "type": "option"
1276
1205
  },
1277
- "apis": {
1278
- "char": "a",
1279
- "description": "Comma-separated list of API names to include in project",
1280
- "name": "apis",
1281
- "required": false,
1206
+ "visibility": {
1207
+ "description": "visibility of API in Swagger",
1208
+ "name": "visibility",
1209
+ "default": "private",
1282
1210
  "hasDynamicHelp": false,
1283
1211
  "multiple": false,
1212
+ "options": [
1213
+ "public",
1214
+ "private"
1215
+ ],
1284
1216
  "type": "option"
1285
1217
  },
1286
- "domains": {
1287
- "char": "d",
1288
- "description": "Comma-separated list of domain names to include in project",
1289
- "name": "domains",
1218
+ "published": {
1219
+ "dependsOn": [
1220
+ "file"
1221
+ ],
1222
+ "description": "sets the lifecycle setting of the API version",
1223
+ "name": "published",
1290
1224
  "required": false,
1225
+ "default": "unpublish",
1291
1226
  "hasDynamicHelp": false,
1292
1227
  "multiple": false,
1228
+ "options": [
1229
+ "publish",
1230
+ "unpublish"
1231
+ ],
1293
1232
  "type": "option"
1294
1233
  },
1234
+ "setdefault": {
1235
+ "dependsOn": [
1236
+ "file"
1237
+ ],
1238
+ "description": "sets API version to be the default",
1239
+ "name": "setdefault",
1240
+ "required": false,
1241
+ "allowNo": false,
1242
+ "type": "boolean"
1243
+ },
1295
1244
  "help": {
1296
1245
  "char": "h",
1297
1246
  "description": "Show CLI help.",
@@ -1302,34 +1251,42 @@
1302
1251
  },
1303
1252
  "hasDynamicHelp": false,
1304
1253
  "hiddenAliases": [],
1305
- "id": "project:create",
1254
+ "id": "api:create",
1306
1255
  "pluginAlias": "swaggerhub-cli",
1307
1256
  "pluginName": "swaggerhub-cli",
1308
1257
  "pluginType": "core",
1309
1258
  "strict": true,
1310
- "enableJsonFlag": false,
1311
- "isESM": false,
1259
+ "isESM": true,
1312
1260
  "relativePath": [
1313
1261
  "src",
1314
1262
  "commands",
1315
- "project",
1263
+ "api",
1316
1264
  "create.js"
1317
1265
  ]
1318
1266
  },
1319
- "project:delete": {
1267
+ "api:delete": {
1320
1268
  "aliases": [],
1321
1269
  "args": {
1322
- "OWNER/PROJECT_NAME": {
1323
- "description": "The project to delete on Swagger",
1324
- "name": "OWNER/PROJECT_NAME",
1270
+ "OWNER/API_NAME/[VERSION]": {
1271
+ "description": "API to delete on Swagger",
1272
+ "name": "OWNER/API_NAME/[VERSION]",
1325
1273
  "required": true
1326
1274
  }
1327
1275
  },
1328
- "description": "Deletes a project from Swagger.",
1276
+ "description": "delete an API or API version\n",
1329
1277
  "examples": [
1330
- "swaggerhub project:delete organization/project_name"
1278
+ "swaggerhub api:delete organization/api/1.0.0",
1279
+ "swaggerhub api:delete organization/api",
1280
+ "swaggerhub api:delete organization/api --force"
1331
1281
  ],
1332
1282
  "flags": {
1283
+ "force": {
1284
+ "char": "f",
1285
+ "description": "delete API without prompting for confirmation",
1286
+ "name": "force",
1287
+ "allowNo": false,
1288
+ "type": "boolean"
1289
+ },
1333
1290
  "help": {
1334
1291
  "char": "h",
1335
1292
  "description": "Show CLI help.",
@@ -1340,34 +1297,58 @@
1340
1297
  },
1341
1298
  "hasDynamicHelp": false,
1342
1299
  "hiddenAliases": [],
1343
- "id": "project:delete",
1300
+ "id": "api:delete",
1344
1301
  "pluginAlias": "swaggerhub-cli",
1345
1302
  "pluginName": "swaggerhub-cli",
1346
1303
  "pluginType": "core",
1347
1304
  "strict": true,
1348
1305
  "enableJsonFlag": false,
1349
- "isESM": false,
1306
+ "isESM": true,
1350
1307
  "relativePath": [
1351
1308
  "src",
1352
1309
  "commands",
1353
- "project",
1310
+ "api",
1354
1311
  "delete.js"
1355
1312
  ]
1356
1313
  },
1357
- "project:get": {
1314
+ "api:fork": {
1358
1315
  "aliases": [],
1359
1316
  "args": {
1360
- "OWNER/PROJECT_NAME": {
1361
- "description": "The project to get details for on Swagger",
1362
- "name": "OWNER/PROJECT_NAME",
1317
+ "OWNER/API_NAME/VERSION": {
1318
+ "description": "API version to fork",
1319
+ "name": "OWNER/API_NAME/VERSION",
1320
+ "required": true
1321
+ },
1322
+ "NEW_OWNER/NEW_API_NAME/NEW_VERSION": {
1323
+ "description": "Owner, name and version of the fork. An existing API name creates a new version of it.",
1324
+ "name": "NEW_OWNER/NEW_API_NAME/NEW_VERSION",
1363
1325
  "required": true
1364
1326
  }
1365
1327
  },
1366
- "description": "Retrieves the details for a project.",
1328
+ "description": "fork an API version\nThe fork can be created as a new API, or as a new version of another existing API.\n",
1367
1329
  "examples": [
1368
- "swaggerhub project:get organization/project_name"
1330
+ "swaggerhub api:fork organization/api/1.0.0 myorg/api-fork/1.0.0",
1331
+ "swaggerhub api:fork organization/api/1.0.0 myorg/api-fork/1.0.0 --project my-project --visibility private"
1369
1332
  ],
1370
1333
  "flags": {
1334
+ "project": {
1335
+ "description": "existing project of the target organization to add the fork to",
1336
+ "name": "project",
1337
+ "hasDynamicHelp": false,
1338
+ "multiple": false,
1339
+ "type": "option"
1340
+ },
1341
+ "visibility": {
1342
+ "description": "visibility of the fork (defaults to the visibility of the source version)",
1343
+ "name": "visibility",
1344
+ "hasDynamicHelp": false,
1345
+ "multiple": false,
1346
+ "options": [
1347
+ "public",
1348
+ "private"
1349
+ ],
1350
+ "type": "option"
1351
+ },
1371
1352
  "help": {
1372
1353
  "char": "h",
1373
1354
  "description": "Show CLI help.",
@@ -1378,106 +1359,95 @@
1378
1359
  },
1379
1360
  "hasDynamicHelp": false,
1380
1361
  "hiddenAliases": [],
1381
- "id": "project:get",
1362
+ "id": "api:fork",
1382
1363
  "pluginAlias": "swaggerhub-cli",
1383
1364
  "pluginName": "swaggerhub-cli",
1384
1365
  "pluginType": "core",
1385
1366
  "strict": true,
1386
1367
  "enableJsonFlag": false,
1387
- "isESM": false,
1368
+ "isESM": true,
1388
1369
  "relativePath": [
1389
1370
  "src",
1390
1371
  "commands",
1391
- "project",
1392
- "get.js"
1372
+ "api",
1373
+ "fork.js"
1393
1374
  ]
1394
1375
  },
1395
- "project:list": {
1376
+ "api:get": {
1396
1377
  "aliases": [],
1397
1378
  "args": {
1398
- "OWNER": {
1399
- "description": "The organization to list projects for on Swagger",
1400
- "name": "OWNER",
1401
- "required": false
1379
+ "OWNER/API_NAME/[VERSION]": {
1380
+ "description": "API to fetch from Swagger",
1381
+ "name": "OWNER/API_NAME/[VERSION]",
1382
+ "required": true
1402
1383
  }
1403
1384
  },
1404
- "description": "list projects",
1385
+ "description": "fetches an API definition\nWhen VERSION is not included in the argument, the default version will be returned.\nReturns the API in YAML format by default.\n",
1405
1386
  "examples": [
1406
- "swaggerhub project:list",
1407
- "swaggerhub project:list organization",
1408
- "swaggerhub project:list organization --limit 20 --order DESC",
1409
- "swaggerhub project:list organization --page 2 --limit 20"
1387
+ "swaggerhub api:get organization/api",
1388
+ "swaggerhub api:get organization/api/1.0.0 --json"
1410
1389
  ],
1411
1390
  "flags": {
1391
+ "json": {
1392
+ "char": "j",
1393
+ "description": "returns the API in JSON format.",
1394
+ "name": "json",
1395
+ "allowNo": false,
1396
+ "type": "boolean"
1397
+ },
1398
+ "resolved": {
1399
+ "char": "r",
1400
+ "description": "gets the resolved API definition",
1401
+ "name": "resolved",
1402
+ "allowNo": false,
1403
+ "type": "boolean"
1404
+ },
1412
1405
  "help": {
1413
1406
  "char": "h",
1414
1407
  "description": "Show CLI help.",
1415
1408
  "name": "help",
1416
1409
  "allowNo": false,
1417
1410
  "type": "boolean"
1418
- },
1419
- "limit": {
1420
- "char": "l",
1421
- "description": "number of projects per page (1-100)",
1422
- "name": "limit",
1423
- "hasDynamicHelp": false,
1424
- "multiple": false,
1425
- "type": "option"
1426
- },
1427
- "page": {
1428
- "description": "zero-based page of projects to return",
1429
- "name": "page",
1430
- "hasDynamicHelp": false,
1431
- "multiple": false,
1432
- "type": "option"
1433
- },
1434
- "order": {
1435
- "description": "sort order of the projects",
1436
- "name": "order",
1437
- "hasDynamicHelp": false,
1438
- "multiple": false,
1439
- "options": [
1440
- "ASC",
1441
- "DESC"
1442
- ],
1443
- "type": "option"
1444
1411
  }
1445
1412
  },
1446
1413
  "hasDynamicHelp": false,
1447
1414
  "hiddenAliases": [],
1448
- "id": "project:list",
1415
+ "id": "api:get",
1449
1416
  "pluginAlias": "swaggerhub-cli",
1450
1417
  "pluginName": "swaggerhub-cli",
1451
1418
  "pluginType": "core",
1452
1419
  "strict": true,
1453
1420
  "enableJsonFlag": false,
1454
- "isESM": false,
1421
+ "isESM": true,
1455
1422
  "relativePath": [
1456
1423
  "src",
1457
1424
  "commands",
1458
- "project",
1459
- "list.js"
1425
+ "api",
1426
+ "get.js"
1460
1427
  ]
1461
1428
  },
1462
- "spectral:download": {
1429
+ "api:publish": {
1463
1430
  "aliases": [],
1464
1431
  "args": {
1465
- "OWNER/RULESET_NAME": {
1466
- "description": "Organization's Spectral ruleset to create or update on Swagger",
1467
- "name": "OWNER/RULESET_NAME",
1468
- "required": true
1469
- },
1470
- "directory": {
1471
- "description": "Relative path to directory the ruleset files should be saved to",
1472
- "name": "directory",
1432
+ "OWNER/API_NAME/VERSION": {
1433
+ "description": "API to publish on Swagger",
1434
+ "name": "OWNER/API_NAME/VERSION",
1473
1435
  "required": true
1474
1436
  }
1475
1437
  },
1476
- "description": "Fetch organization's Spectral ruleset",
1438
+ "description": "publish an API version",
1477
1439
  "examples": [
1478
- "swaggerhub spectral:download my_organization/my_api_ruleset rules/"
1440
+ "swaggerhub api:publish organization/api/1.0.0",
1441
+ "swaggerhub api:publish organization/api/1.0.0 --force"
1479
1442
  ],
1480
1443
  "flags": {
1444
+ "force": {
1445
+ "char": "f",
1446
+ "description": "publish API without prompting for confirmation",
1447
+ "name": "force",
1448
+ "allowNo": false,
1449
+ "type": "boolean"
1450
+ },
1481
1451
  "help": {
1482
1452
  "char": "h",
1483
1453
  "description": "Show CLI help.",
@@ -1488,37 +1458,36 @@
1488
1458
  },
1489
1459
  "hasDynamicHelp": false,
1490
1460
  "hiddenAliases": [],
1491
- "id": "spectral:download",
1461
+ "id": "api:publish",
1492
1462
  "pluginAlias": "swaggerhub-cli",
1493
1463
  "pluginName": "swaggerhub-cli",
1494
1464
  "pluginType": "core",
1495
1465
  "strict": true,
1496
- "enableJsonFlag": false,
1497
- "isESM": false,
1466
+ "isESM": true,
1498
1467
  "relativePath": [
1499
1468
  "src",
1500
1469
  "commands",
1501
- "spectral",
1502
- "download.js"
1470
+ "api",
1471
+ "publish.js"
1503
1472
  ]
1504
1473
  },
1505
- "spectral:upload": {
1474
+ "api:rename": {
1506
1475
  "aliases": [],
1507
1476
  "args": {
1508
- "OWNER/RULESET_NAME": {
1509
- "description": "Organization's Spectral ruleset to create or update on Swagger",
1510
- "name": "OWNER/RULESET_NAME",
1477
+ "OWNER/API_NAME": {
1478
+ "description": "API to be renamed",
1479
+ "name": "OWNER/API_NAME",
1511
1480
  "required": true
1512
1481
  },
1513
- "directory": {
1514
- "description": "Relative path to directory with ruleset files",
1515
- "name": "directory",
1482
+ "API_NEW_NAME": {
1483
+ "description": "New name for the API",
1484
+ "name": "API_NEW_NAME",
1516
1485
  "required": true
1517
1486
  }
1518
1487
  },
1519
- "description": "Create or update organization's Spectral ruleset",
1488
+ "description": "rename an API",
1520
1489
  "examples": [
1521
- "swaggerhub spectral:upload my_organization/my_api_ruleset rules/"
1490
+ "swaggerhub api:rename organization/apiOldName apiNewName"
1522
1491
  ],
1523
1492
  "flags": {
1524
1493
  "help": {
@@ -1531,51 +1500,34 @@
1531
1500
  },
1532
1501
  "hasDynamicHelp": false,
1533
1502
  "hiddenAliases": [],
1534
- "id": "spectral:upload",
1503
+ "id": "api:rename",
1535
1504
  "pluginAlias": "swaggerhub-cli",
1536
1505
  "pluginName": "swaggerhub-cli",
1537
1506
  "pluginType": "core",
1538
1507
  "strict": true,
1539
1508
  "enableJsonFlag": false,
1540
- "isESM": false,
1509
+ "isESM": true,
1541
1510
  "relativePath": [
1542
1511
  "src",
1543
1512
  "commands",
1544
- "spectral",
1545
- "upload.js"
1513
+ "api",
1514
+ "rename.js"
1546
1515
  ]
1547
1516
  },
1548
- "api:validate:download-rules": {
1517
+ "api:setdefault": {
1549
1518
  "aliases": [],
1550
1519
  "args": {
1551
- "OWNER": {
1552
- "description": "Which organization standardization rules to fetch from Swagger",
1553
- "name": "OWNER",
1520
+ "OWNER/API_NAME/VERSION": {
1521
+ "description": "API to set as default on Swagger",
1522
+ "name": "OWNER/API_NAME/VERSION",
1554
1523
  "required": true
1555
1524
  }
1556
1525
  },
1557
- "description": "Get an organization's existing standardization ruleset from Swagger.\nRequires organization name argument. An error will occur if the provided organization doesn't exist\nor your account is not permitted to access that organization's settings.\nIf the flag `-s` or `--include-system-rules` is used, the returned ruleset will also include Swagger system rules.\nIf the flag `-d` or `--include-disabled-rules` is used, the returned ruleset will also include disabled custom rules.",
1526
+ "description": "set the default version of an API",
1558
1527
  "examples": [
1559
- "swaggerhub api:validate:download-rules myOrg -s",
1560
- "swaggerhub api:validate:download-rules myOrg --include-disabled-rules -s"
1528
+ "swaggerhub api:setdefault organization/api/2.0.0"
1561
1529
  ],
1562
1530
  "flags": {
1563
- "include-system-rules": {
1564
- "char": "s",
1565
- "description": "Includes system rules in fetched organization's ruleset",
1566
- "name": "include-system-rules",
1567
- "required": false,
1568
- "allowNo": false,
1569
- "type": "boolean"
1570
- },
1571
- "include-disabled-rules": {
1572
- "char": "d",
1573
- "description": "Includes disabled rules in fetched organization's ruleset",
1574
- "name": "include-disabled-rules",
1575
- "required": false,
1576
- "allowNo": false,
1577
- "type": "boolean"
1578
- },
1579
1531
  "help": {
1580
1532
  "char": "h",
1581
1533
  "description": "Show CLI help.",
@@ -1586,51 +1538,33 @@
1586
1538
  },
1587
1539
  "hasDynamicHelp": false,
1588
1540
  "hiddenAliases": [],
1589
- "id": "api:validate:download-rules",
1541
+ "id": "api:setdefault",
1590
1542
  "pluginAlias": "swaggerhub-cli",
1591
1543
  "pluginName": "swaggerhub-cli",
1592
1544
  "pluginType": "core",
1593
1545
  "strict": true,
1594
- "enableJsonFlag": false,
1595
- "isESM": false,
1546
+ "isESM": true,
1596
1547
  "relativePath": [
1597
1548
  "src",
1598
1549
  "commands",
1599
1550
  "api",
1600
- "validate",
1601
- "download-rules.js"
1551
+ "setdefault.js"
1602
1552
  ]
1603
1553
  },
1604
- "api:validate": {
1554
+ "api:unpublish": {
1605
1555
  "aliases": [],
1606
1556
  "args": {
1607
- "OWNER/API_NAME/[VERSION]": {
1608
- "description": "API to fetch validation errors for",
1609
- "name": "OWNER/API_NAME/[VERSION]",
1557
+ "OWNER/API_NAME/VERSION": {
1558
+ "description": "API identifier",
1559
+ "name": "OWNER/API_NAME/VERSION",
1610
1560
  "required": true
1611
1561
  }
1612
1562
  },
1613
- "description": "Get validation result for an API version\nWhen VERSION is not included in the argument, the default version will be validated.\nAn error will occur if the API version does not exist.\nIf the flag `-c` or `--fail-on-critical` is used and there are standardization\nerrors with `Critical` severity present, the command will exit with error code `1`.\n",
1563
+ "description": "unpublish an API version",
1614
1564
  "examples": [
1615
- "swaggerhub api:validate organization/api/1.0.0",
1616
- "swaggerhub api:validate -c -j organization/api/1.0.0",
1617
- "swaggerhub api:validate --fail-on-critical --json organization/api"
1565
+ "swaggerhub api:unpublish organization/api/1.0.0"
1618
1566
  ],
1619
1567
  "flags": {
1620
- "fail-on-critical": {
1621
- "char": "c",
1622
- "description": "Exit with error code 1 if there are critical standardization errors present",
1623
- "name": "fail-on-critical",
1624
- "allowNo": false,
1625
- "type": "boolean"
1626
- },
1627
- "json": {
1628
- "char": "j",
1629
- "description": "Print output in JSON instead of table format",
1630
- "name": "json",
1631
- "allowNo": false,
1632
- "type": "boolean"
1633
- },
1634
1568
  "help": {
1635
1569
  "char": "h",
1636
1570
  "description": "Show CLI help.",
@@ -1641,59 +1575,74 @@
1641
1575
  },
1642
1576
  "hasDynamicHelp": false,
1643
1577
  "hiddenAliases": [],
1644
- "id": "api:validate",
1578
+ "id": "api:unpublish",
1645
1579
  "pluginAlias": "swaggerhub-cli",
1646
1580
  "pluginName": "swaggerhub-cli",
1647
1581
  "pluginType": "core",
1648
1582
  "strict": true,
1649
- "enableJsonFlag": false,
1650
- "isESM": false,
1583
+ "isESM": true,
1651
1584
  "relativePath": [
1652
1585
  "src",
1653
1586
  "commands",
1654
1587
  "api",
1655
- "validate",
1656
- "index.js"
1588
+ "unpublish.js"
1657
1589
  ]
1658
1590
  },
1659
- "api:validate:local": {
1591
+ "api:update": {
1660
1592
  "aliases": [],
1661
- "args": {},
1662
- "description": "Runs a scan against a local API definition using the organization's standardization configuration on Swagger.\nIf the flag `-c` or `--fail-on-critical` is used and there are standardization\nerrors with `Critical` severity present, the command will exit with error code `1`.\n",
1593
+ "args": {
1594
+ "OWNER/API_NAME/[VERSION]": {
1595
+ "description": "API to update on Swagger",
1596
+ "name": "OWNER/API_NAME/[VERSION]",
1597
+ "required": true
1598
+ }
1599
+ },
1600
+ "description": "update an API\nThe API version from the file will be used unless the version is specified in the command argument.\nWhen no file is specified then the default API version will be updated.\nThe API visibility can be changed by using the --visibility flag.\n",
1663
1601
  "examples": [
1664
- "swaggerhub api:validate:local -o myOrg -f ./my-api.yaml -c -j ",
1665
- "swaggerhub api:validate:local --organization myOrg --file ./my-api.json --fail-on-critical --json"
1602
+ "swaggerhub api:update organization/api --file api.yaml",
1603
+ "swaggerhub api:update organization/api/1.0.0 --file api.json",
1604
+ "swaggerhub api:update organization/api/1.0.0 --published=publish --file api.json",
1605
+ "swaggerhub api:update organization/api/1.0.0 --setdefault --file api.json",
1606
+ "swaggerhub api:update organization/api/1.0.0 --published=unpublish --setdefault --file api.json",
1607
+ "swaggerhub api:update organization/api/1.0.0 --visibility=private"
1666
1608
  ],
1667
1609
  "flags": {
1668
1610
  "file": {
1669
1611
  "char": "f",
1670
- "description": "Path of API definition file to run scan against",
1612
+ "description": "file location of API to update",
1671
1613
  "name": "file",
1672
- "required": true,
1614
+ "required": false,
1673
1615
  "hasDynamicHelp": false,
1674
1616
  "multiple": false,
1675
1617
  "type": "option"
1676
1618
  },
1677
- "organization": {
1678
- "char": "o",
1679
- "description": "Which organization's standardization settings to use for linting the target definition",
1680
- "name": "organization",
1681
- "required": true,
1619
+ "visibility": {
1620
+ "description": "visibility of API in Swagger",
1621
+ "name": "visibility",
1682
1622
  "hasDynamicHelp": false,
1683
1623
  "multiple": false,
1624
+ "options": [
1625
+ "public",
1626
+ "private"
1627
+ ],
1684
1628
  "type": "option"
1685
1629
  },
1686
- "fail-on-critical": {
1687
- "char": "c",
1688
- "description": "Exit with error code 1 if there are critical standardization errors present",
1689
- "name": "fail-on-critical",
1690
- "allowNo": false,
1691
- "type": "boolean"
1630
+ "published": {
1631
+ "description": "sets the lifecycle setting of the API version",
1632
+ "name": "published",
1633
+ "required": false,
1634
+ "hasDynamicHelp": false,
1635
+ "multiple": false,
1636
+ "options": [
1637
+ "publish",
1638
+ "unpublish"
1639
+ ],
1640
+ "type": "option"
1692
1641
  },
1693
- "json": {
1694
- "char": "j",
1695
- "description": "Print output in JSON instead of table format",
1696
- "name": "json",
1642
+ "setdefault": {
1643
+ "description": "sets API version to be the default",
1644
+ "name": "setdefault",
1645
+ "required": false,
1697
1646
  "allowNo": false,
1698
1647
  "type": "boolean"
1699
1648
  },
@@ -1707,19 +1656,17 @@
1707
1656
  },
1708
1657
  "hasDynamicHelp": false,
1709
1658
  "hiddenAliases": [],
1710
- "id": "api:validate:local",
1659
+ "id": "api:update",
1711
1660
  "pluginAlias": "swaggerhub-cli",
1712
1661
  "pluginName": "swaggerhub-cli",
1713
1662
  "pluginType": "core",
1714
1663
  "strict": true,
1715
- "enableJsonFlag": false,
1716
- "isESM": false,
1664
+ "isESM": true,
1717
1665
  "relativePath": [
1718
1666
  "src",
1719
1667
  "commands",
1720
1668
  "api",
1721
- "validate",
1722
- "local.js"
1669
+ "update.js"
1723
1670
  ]
1724
1671
  },
1725
1672
  "project:api:add": {
@@ -1757,7 +1704,7 @@
1757
1704
  "pluginType": "core",
1758
1705
  "strict": true,
1759
1706
  "enableJsonFlag": false,
1760
- "isESM": false,
1707
+ "isESM": true,
1761
1708
  "relativePath": [
1762
1709
  "src",
1763
1710
  "commands",
@@ -1801,7 +1748,7 @@
1801
1748
  "pluginType": "core",
1802
1749
  "strict": true,
1803
1750
  "enableJsonFlag": false,
1804
- "isESM": false,
1751
+ "isESM": true,
1805
1752
  "relativePath": [
1806
1753
  "src",
1807
1754
  "commands",
@@ -1845,7 +1792,7 @@
1845
1792
  "pluginType": "core",
1846
1793
  "strict": true,
1847
1794
  "enableJsonFlag": false,
1848
- "isESM": false,
1795
+ "isESM": true,
1849
1796
  "relativePath": [
1850
1797
  "src",
1851
1798
  "commands",
@@ -1889,7 +1836,7 @@
1889
1836
  "pluginType": "core",
1890
1837
  "strict": true,
1891
1838
  "enableJsonFlag": false,
1892
- "isESM": false,
1839
+ "isESM": true,
1893
1840
  "relativePath": [
1894
1841
  "src",
1895
1842
  "commands",
@@ -1928,7 +1875,7 @@
1928
1875
  "pluginType": "core",
1929
1876
  "strict": true,
1930
1877
  "enableJsonFlag": false,
1931
- "isESM": false,
1878
+ "isESM": true,
1932
1879
  "relativePath": [
1933
1880
  "src",
1934
1881
  "commands",
@@ -1936,7 +1883,231 @@
1936
1883
  "member",
1937
1884
  "list.js"
1938
1885
  ]
1886
+ },
1887
+ "api:comment:list": {
1888
+ "aliases": [],
1889
+ "args": {
1890
+ "OWNER/API_NAME/VERSION": {
1891
+ "description": "API version to list comments for",
1892
+ "name": "OWNER/API_NAME/VERSION",
1893
+ "required": true
1894
+ }
1895
+ },
1896
+ "description": "list the comments of an API version",
1897
+ "examples": [
1898
+ "swaggerhub api:comment:list organization/api/1.0.0",
1899
+ "swaggerhub api:comment:list organization/api/1.0.0 --json"
1900
+ ],
1901
+ "flags": {
1902
+ "json": {
1903
+ "char": "j",
1904
+ "description": "prints the comments, including replies and ranges, as JSON",
1905
+ "name": "json",
1906
+ "allowNo": false,
1907
+ "type": "boolean"
1908
+ },
1909
+ "help": {
1910
+ "char": "h",
1911
+ "description": "Show CLI help.",
1912
+ "name": "help",
1913
+ "allowNo": false,
1914
+ "type": "boolean"
1915
+ }
1916
+ },
1917
+ "hasDynamicHelp": false,
1918
+ "hiddenAliases": [],
1919
+ "id": "api:comment:list",
1920
+ "pluginAlias": "swaggerhub-cli",
1921
+ "pluginName": "swaggerhub-cli",
1922
+ "pluginType": "core",
1923
+ "strict": true,
1924
+ "enableJsonFlag": false,
1925
+ "isESM": true,
1926
+ "relativePath": [
1927
+ "src",
1928
+ "commands",
1929
+ "api",
1930
+ "comment",
1931
+ "list.js"
1932
+ ]
1933
+ },
1934
+ "api:validate:download-rules": {
1935
+ "aliases": [],
1936
+ "args": {
1937
+ "OWNER": {
1938
+ "description": "Which organization standardization rules to fetch from Swagger",
1939
+ "name": "OWNER",
1940
+ "required": true
1941
+ }
1942
+ },
1943
+ "description": "Get an organization's existing standardization ruleset from Swagger.\nRequires organization name argument. An error will occur if the provided organization doesn't exist\nor your account is not permitted to access that organization's settings.\nIf the flag `-s` or `--include-system-rules` is used, the returned ruleset will also include Swagger system rules.\nIf the flag `-d` or `--include-disabled-rules` is used, the returned ruleset will also include disabled custom rules.",
1944
+ "examples": [
1945
+ "swaggerhub api:validate:download-rules myOrg -s",
1946
+ "swaggerhub api:validate:download-rules myOrg --include-disabled-rules -s"
1947
+ ],
1948
+ "flags": {
1949
+ "include-system-rules": {
1950
+ "char": "s",
1951
+ "description": "Includes system rules in fetched organization's ruleset",
1952
+ "name": "include-system-rules",
1953
+ "required": false,
1954
+ "allowNo": false,
1955
+ "type": "boolean"
1956
+ },
1957
+ "include-disabled-rules": {
1958
+ "char": "d",
1959
+ "description": "Includes disabled rules in fetched organization's ruleset",
1960
+ "name": "include-disabled-rules",
1961
+ "required": false,
1962
+ "allowNo": false,
1963
+ "type": "boolean"
1964
+ },
1965
+ "help": {
1966
+ "char": "h",
1967
+ "description": "Show CLI help.",
1968
+ "name": "help",
1969
+ "allowNo": false,
1970
+ "type": "boolean"
1971
+ }
1972
+ },
1973
+ "hasDynamicHelp": false,
1974
+ "hiddenAliases": [],
1975
+ "id": "api:validate:download-rules",
1976
+ "pluginAlias": "swaggerhub-cli",
1977
+ "pluginName": "swaggerhub-cli",
1978
+ "pluginType": "core",
1979
+ "strict": true,
1980
+ "enableJsonFlag": false,
1981
+ "isESM": true,
1982
+ "relativePath": [
1983
+ "src",
1984
+ "commands",
1985
+ "api",
1986
+ "validate",
1987
+ "download-rules.js"
1988
+ ]
1989
+ },
1990
+ "api:validate": {
1991
+ "aliases": [],
1992
+ "args": {
1993
+ "OWNER/API_NAME/[VERSION]": {
1994
+ "description": "API to fetch validation errors for",
1995
+ "name": "OWNER/API_NAME/[VERSION]",
1996
+ "required": true
1997
+ }
1998
+ },
1999
+ "description": "Get validation result for an API version\nWhen VERSION is not included in the argument, the default version will be validated.\nAn error will occur if the API version does not exist.\nIf the flag `-c` or `--fail-on-critical` is used and there are standardization\nerrors with `Critical` severity present, the command will exit with error code `1`.\n",
2000
+ "examples": [
2001
+ "swaggerhub api:validate organization/api/1.0.0",
2002
+ "swaggerhub api:validate -c -j organization/api/1.0.0",
2003
+ "swaggerhub api:validate --fail-on-critical --json organization/api"
2004
+ ],
2005
+ "flags": {
2006
+ "fail-on-critical": {
2007
+ "char": "c",
2008
+ "description": "Exit with error code 1 if there are critical standardization errors present",
2009
+ "name": "fail-on-critical",
2010
+ "allowNo": false,
2011
+ "type": "boolean"
2012
+ },
2013
+ "json": {
2014
+ "char": "j",
2015
+ "description": "Print output in JSON instead of table format",
2016
+ "name": "json",
2017
+ "allowNo": false,
2018
+ "type": "boolean"
2019
+ },
2020
+ "help": {
2021
+ "char": "h",
2022
+ "description": "Show CLI help.",
2023
+ "name": "help",
2024
+ "allowNo": false,
2025
+ "type": "boolean"
2026
+ }
2027
+ },
2028
+ "hasDynamicHelp": false,
2029
+ "hiddenAliases": [],
2030
+ "id": "api:validate",
2031
+ "pluginAlias": "swaggerhub-cli",
2032
+ "pluginName": "swaggerhub-cli",
2033
+ "pluginType": "core",
2034
+ "strict": true,
2035
+ "enableJsonFlag": false,
2036
+ "isESM": true,
2037
+ "relativePath": [
2038
+ "src",
2039
+ "commands",
2040
+ "api",
2041
+ "validate",
2042
+ "index.js"
2043
+ ]
2044
+ },
2045
+ "api:validate:local": {
2046
+ "aliases": [],
2047
+ "args": {},
2048
+ "description": "Runs a scan against a local API definition using the organization's standardization configuration on Swagger.\nIf the flag `-c` or `--fail-on-critical` is used and there are standardization\nerrors with `Critical` severity present, the command will exit with error code `1`.\n",
2049
+ "examples": [
2050
+ "swaggerhub api:validate:local -o myOrg -f ./my-api.yaml -c -j ",
2051
+ "swaggerhub api:validate:local --organization myOrg --file ./my-api.json --fail-on-critical --json"
2052
+ ],
2053
+ "flags": {
2054
+ "file": {
2055
+ "char": "f",
2056
+ "description": "Path of API definition file to run scan against",
2057
+ "name": "file",
2058
+ "required": true,
2059
+ "hasDynamicHelp": false,
2060
+ "multiple": false,
2061
+ "type": "option"
2062
+ },
2063
+ "organization": {
2064
+ "char": "o",
2065
+ "description": "Which organization's standardization settings to use for linting the target definition",
2066
+ "name": "organization",
2067
+ "required": true,
2068
+ "hasDynamicHelp": false,
2069
+ "multiple": false,
2070
+ "type": "option"
2071
+ },
2072
+ "fail-on-critical": {
2073
+ "char": "c",
2074
+ "description": "Exit with error code 1 if there are critical standardization errors present",
2075
+ "name": "fail-on-critical",
2076
+ "allowNo": false,
2077
+ "type": "boolean"
2078
+ },
2079
+ "json": {
2080
+ "char": "j",
2081
+ "description": "Print output in JSON instead of table format",
2082
+ "name": "json",
2083
+ "allowNo": false,
2084
+ "type": "boolean"
2085
+ },
2086
+ "help": {
2087
+ "char": "h",
2088
+ "description": "Show CLI help.",
2089
+ "name": "help",
2090
+ "allowNo": false,
2091
+ "type": "boolean"
2092
+ }
2093
+ },
2094
+ "hasDynamicHelp": false,
2095
+ "hiddenAliases": [],
2096
+ "id": "api:validate:local",
2097
+ "pluginAlias": "swaggerhub-cli",
2098
+ "pluginName": "swaggerhub-cli",
2099
+ "pluginType": "core",
2100
+ "strict": true,
2101
+ "enableJsonFlag": false,
2102
+ "isESM": true,
2103
+ "relativePath": [
2104
+ "src",
2105
+ "commands",
2106
+ "api",
2107
+ "validate",
2108
+ "local.js"
2109
+ ]
1939
2110
  }
1940
2111
  },
1941
- "version": "0.14.0"
2112
+ "version": "0.16.0"
1942
2113
  }