swaggerhub-cli 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -106,6 +106,7 @@ USAGE
106
106
  * [`swaggerhub api:delete OWNER/API_NAME/[VERSION]`](#swaggerhub-apidelete)
107
107
  * [`swaggerhub api:get OWNER/API_NAME/[VERSION]`](#swaggerhub-apiget)
108
108
  * [`swaggerhub api:publish OWNER/API_NAME/VERSION`](#swaggerhub-apipublish)
109
+ * [`swaggerhub api:rename OWNER/API_NAME API_NEW_NAME`](#swaggerhub-apirename)
109
110
  * [`swaggerhub api:setdefault OWNER/API_NAME/VERSION`](#swaggerhub-apisetdefault)
110
111
  * [`swaggerhub api:unpublish OWNER/API_NAME/VERSION`](#swaggerhub-apiunpublish)
111
112
  * [`swaggerhub api:update OWNER/API_NAME/[VERSION]`](#swaggerhub-apiupdate)
@@ -146,8 +147,8 @@ USAGE
146
147
  * [`swaggerhub project:get OWNER/PROJECT_NAME`](#swaggerhub-projectget)
147
148
  * [`swaggerhub project:list [OWNER]`](#swaggerhub-projectlist)
148
149
  * [`swaggerhub project:member:list OWNER/PROJECT_NAME`](#swaggerhub-projectmemberlist)
149
- * [`swaggerhub spectral:upload OWNER/RULESET_NAME directory`](#swaggerhub-spectralupload)
150
- * [`swaggerhub spectral:download OWNER/RULESET_NAME directory`](#swaggerhub-spectraldownload)
150
+ * [`swaggerhub spectral:download OWNER/RULESET_NAME DIRECTORY`](#swaggerhub-spectraldownload)
151
+ * [`swaggerhub spectral:upload OWNER/RULESET_NAME DIRECTORY`](#swaggerhub-spectralupload)
151
152
 
152
153
  ## `swaggerhub api:create`
153
154
 
@@ -188,7 +189,7 @@ EXAMPLES
188
189
  $ swaggerhub api:create organization/api/1.0.0 --published=publish --setdefault --file api.json
189
190
  ```
190
191
 
191
- _See code: [src/commands/api/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/create.js)_
192
+ _See code: [src/commands/api/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/create.js)_
192
193
 
193
194
  ## `swaggerhub api:delete`
194
195
 
@@ -217,7 +218,7 @@ EXAMPLES
217
218
  $ swaggerhub api:delete organization/api --force
218
219
  ```
219
220
 
220
- _See code: [src/commands/api/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/delete.js)_
221
+ _See code: [src/commands/api/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/delete.js)_
221
222
 
222
223
  ## `swaggerhub api:get`
223
224
 
@@ -247,7 +248,7 @@ EXAMPLES
247
248
  $ swaggerhub api:get organization/api/1.0.0 --json
248
249
  ```
249
250
 
250
- _See code: [src/commands/api/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/get.js)_
251
+ _See code: [src/commands/api/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/get.js)_
251
252
 
252
253
  ## `swaggerhub api:publish`
253
254
 
@@ -273,7 +274,31 @@ EXAMPLES
273
274
  $ swaggerhub api:publish organization/api/1.0.0 --force
274
275
  ```
275
276
 
276
- _See code: [src/commands/api/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/publish.js)_
277
+ _See code: [src/commands/api/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/publish.js)_
278
+
279
+ ## `swaggerhub api:rename`
280
+
281
+ rename an API
282
+
283
+ ```
284
+ USAGE
285
+ $ swaggerhub api:rename OWNER/API_NAME API_NEW_NAME [-h]
286
+
287
+ ARGUMENTS
288
+ OWNER/API_NAME API to be renamed
289
+ API_NEW_NAME New name for the API
290
+
291
+ FLAGS
292
+ -h, --help Show CLI help.
293
+
294
+ DESCRIPTION
295
+ rename an API
296
+
297
+ EXAMPLES
298
+ $ swaggerhub api:rename organization/apiOldName apiNewName
299
+ ```
300
+
301
+ _See code: [src/commands/api/rename.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/rename.js)_
277
302
 
278
303
  ## `swaggerhub api:setdefault`
279
304
 
@@ -296,7 +321,7 @@ EXAMPLES
296
321
  $ swaggerhub api:setdefault organization/api/2.0.0
297
322
  ```
298
323
 
299
- _See code: [src/commands/api/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/setdefault.js)_
324
+ _See code: [src/commands/api/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/setdefault.js)_
300
325
 
301
326
  ## `swaggerhub api:unpublish`
302
327
 
@@ -319,7 +344,7 @@ EXAMPLES
319
344
  $ swaggerhub api:unpublish organization/api/1.0.0
320
345
  ```
321
346
 
322
- _See code: [src/commands/api/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/unpublish.js)_
347
+ _See code: [src/commands/api/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/unpublish.js)_
323
348
 
324
349
  ## `swaggerhub api:update`
325
350
 
@@ -363,7 +388,7 @@ EXAMPLES
363
388
  $ swaggerhub api:update organization/api/1.0.0 --visibility=private
364
389
  ```
365
390
 
366
- _See code: [src/commands/api/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/update.js)_
391
+ _See code: [src/commands/api/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/update.js)_
367
392
 
368
393
  ## `swaggerhub api:validate`
369
394
 
@@ -397,7 +422,7 @@ EXAMPLES
397
422
  $ swaggerhub api:validate --fail-on-critical --json organization/api
398
423
  ```
399
424
 
400
- _See code: [src/commands/api/validate/index.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/validate/index.js)_
425
+ _See code: [src/commands/api/validate/index.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/validate/index.js)_
401
426
 
402
427
  ## `swaggerhub api:validate:download-rules`
403
428
 
@@ -428,7 +453,7 @@ EXAMPLES
428
453
  $ swaggerhub api:validate:download-rules myOrg --include-disabled-rules -s
429
454
  ```
430
455
 
431
- _See code: [src/commands/api/validate/download-rules.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/validate/download-rules.js)_
456
+ _See code: [src/commands/api/validate/download-rules.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/validate/download-rules.js)_
432
457
 
433
458
  ## `swaggerhub api:validate:local`
434
459
 
@@ -458,7 +483,7 @@ EXAMPLES
458
483
  $ swaggerhub api:validate:local --organization myOrg --file ./my-api/json --fail-on-critical --json
459
484
  ```
460
485
 
461
- _See code: [src/commands/api/validate/local.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/api/validate/local.js)_
486
+ _See code: [src/commands/api/validate/local.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/api/validate/local.js)_
462
487
 
463
488
  ## `swaggerhub configure`
464
489
 
@@ -481,7 +506,7 @@ DESCRIPTION
481
506
  settings.
482
507
  ```
483
508
 
484
- _See code: [src/commands/configure.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/configure.js)_
509
+ _See code: [src/commands/configure.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/configure.js)_
485
510
 
486
511
  ## `swaggerhub domain:create`
487
512
 
@@ -522,7 +547,7 @@ EXAMPLES
522
547
  $ swaggerhub domain:create organization/domain/1.0.0 --publish --setdefault --file domain.json
523
548
  ```
524
549
 
525
- _See code: [src/commands/domain/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/domain/create.js)_
550
+ _See code: [src/commands/domain/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/domain/create.js)_
526
551
 
527
552
  ## `swaggerhub domain:delete`
528
553
 
@@ -551,7 +576,7 @@ EXAMPLES
551
576
  $ swaggerhub domain:delete organization/domain --force
552
577
  ```
553
578
 
554
- _See code: [src/commands/domain/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/domain/delete.js)_
579
+ _See code: [src/commands/domain/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/domain/delete.js)_
555
580
 
556
581
  ## `swaggerhub domain:get`
557
582
 
@@ -580,7 +605,7 @@ EXAMPLES
580
605
  $ swaggerhub domain:get organization/domain/1.0.0 --json
581
606
  ```
582
607
 
583
- _See code: [src/commands/domain/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/domain/get.js)_
608
+ _See code: [src/commands/domain/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/domain/get.js)_
584
609
 
585
610
  ## `swaggerhub domain:publish`
586
611
 
@@ -603,7 +628,7 @@ EXAMPLES
603
628
  $ swaggerhub domain:publish organization/domain/1.0.0
604
629
  ```
605
630
 
606
- _See code: [src/commands/domain/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/domain/publish.js)_
631
+ _See code: [src/commands/domain/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/domain/publish.js)_
607
632
 
608
633
  ## `swaggerhub domain:setdefault`
609
634
 
@@ -626,7 +651,7 @@ EXAMPLES
626
651
  $ swaggerhub domain:setdefault organization/domain/2.0.0
627
652
  ```
628
653
 
629
- _See code: [src/commands/domain/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/domain/setdefault.js)_
654
+ _See code: [src/commands/domain/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/domain/setdefault.js)_
630
655
 
631
656
  ## `swaggerhub domain:unpublish`
632
657
 
@@ -649,7 +674,7 @@ EXAMPLES
649
674
  $ swaggerhub domain:unpublish organization/domain/1.0.0
650
675
  ```
651
676
 
652
- _See code: [src/commands/domain/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/domain/unpublish.js)_
677
+ _See code: [src/commands/domain/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/domain/unpublish.js)_
653
678
 
654
679
  ## `swaggerhub domain:update`
655
680
 
@@ -693,7 +718,7 @@ EXAMPLES
693
718
  $ swaggerhub domain:update organization/domain/1.0.0 --visibility=private
694
719
  ```
695
720
 
696
- _See code: [src/commands/domain/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/domain/update.js)_
721
+ _See code: [src/commands/domain/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/domain/update.js)_
697
722
 
698
723
  ## `swaggerhub help`
699
724
 
@@ -713,7 +738,7 @@ DESCRIPTION
713
738
  Display help for swaggerhub.
714
739
  ```
715
740
 
716
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.22/src/commands/help.ts)_
741
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.3.0/src/commands/help.ts)_
717
742
 
718
743
  ## `swaggerhub integration:create`
719
744
 
@@ -741,7 +766,7 @@ EXAMPLES
741
766
  $ swaggerhub integration:create organization/api/1.0.0 --file config.json
742
767
  ```
743
768
 
744
- _See code: [src/commands/integration/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/integration/create.js)_
769
+ _See code: [src/commands/integration/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/integration/create.js)_
745
770
 
746
771
  ## `swaggerhub integration:delete`
747
772
 
@@ -764,7 +789,7 @@ EXAMPLES
764
789
  $ swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
765
790
  ```
766
791
 
767
- _See code: [src/commands/integration/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/integration/delete.js)_
792
+ _See code: [src/commands/integration/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/integration/delete.js)_
768
793
 
769
794
  ## `swaggerhub integration:execute`
770
795
 
@@ -787,7 +812,7 @@ EXAMPLES
787
812
  $ swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
788
813
  ```
789
814
 
790
- _See code: [src/commands/integration/execute.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/integration/execute.js)_
815
+ _See code: [src/commands/integration/execute.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/integration/execute.js)_
791
816
 
792
817
  ## `swaggerhub integration:get`
793
818
 
@@ -810,7 +835,7 @@ EXAMPLES
810
835
  $ swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
811
836
  ```
812
837
 
813
- _See code: [src/commands/integration/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/integration/get.js)_
838
+ _See code: [src/commands/integration/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/integration/get.js)_
814
839
 
815
840
  ## `swaggerhub integration:list`
816
841
 
@@ -833,7 +858,7 @@ EXAMPLES
833
858
  $ swaggerhub integration:list organization/api/1.0.0
834
859
  ```
835
860
 
836
- _See code: [src/commands/integration/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/integration/list.js)_
861
+ _See code: [src/commands/integration/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/integration/list.js)_
837
862
 
838
863
  ## `swaggerhub integration:update`
839
864
 
@@ -857,7 +882,7 @@ EXAMPLES
857
882
  $ swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json
858
883
  ```
859
884
 
860
- _See code: [src/commands/integration/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/integration/update.js)_
885
+ _See code: [src/commands/integration/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/integration/update.js)_
861
886
 
862
887
  ## `swaggerhub plugins`
863
888
 
@@ -880,7 +905,7 @@ EXAMPLES
880
905
  $ swaggerhub plugins
881
906
  ```
882
907
 
883
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.25/src/commands/plugins/index.ts)_
908
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/index.ts)_
884
909
 
885
910
  ## `swaggerhub plugins:add`
886
911
 
@@ -954,7 +979,7 @@ EXAMPLES
954
979
  $ swaggerhub plugins:inspect myplugin
955
980
  ```
956
981
 
957
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.25/src/commands/plugins/inspect.ts)_
982
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/inspect.ts)_
958
983
 
959
984
  ## `swaggerhub plugins:install`
960
985
 
@@ -1003,7 +1028,7 @@ EXAMPLES
1003
1028
  $ swaggerhub plugins:install someuser/someplugin
1004
1029
  ```
1005
1030
 
1006
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.25/src/commands/plugins/install.ts)_
1031
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/install.ts)_
1007
1032
 
1008
1033
  ## `swaggerhub plugins:link`
1009
1034
 
@@ -1034,7 +1059,7 @@ EXAMPLES
1034
1059
  $ swaggerhub plugins:link myplugin
1035
1060
  ```
1036
1061
 
1037
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.25/src/commands/plugins/link.ts)_
1062
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/link.ts)_
1038
1063
 
1039
1064
  ## `swaggerhub plugins:remove`
1040
1065
 
@@ -1075,7 +1100,7 @@ FLAGS
1075
1100
  --reinstall Reinstall all plugins after uninstalling.
1076
1101
  ```
1077
1102
 
1078
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.25/src/commands/plugins/reset.ts)_
1103
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/reset.ts)_
1079
1104
 
1080
1105
  ## `swaggerhub plugins:uninstall`
1081
1106
 
@@ -1103,7 +1128,7 @@ EXAMPLES
1103
1128
  $ swaggerhub plugins:uninstall myplugin
1104
1129
  ```
1105
1130
 
1106
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.25/src/commands/plugins/uninstall.ts)_
1131
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/uninstall.ts)_
1107
1132
 
1108
1133
  ## `swaggerhub plugins:unlink`
1109
1134
 
@@ -1147,7 +1172,7 @@ DESCRIPTION
1147
1172
  Update installed plugins.
1148
1173
  ```
1149
1174
 
1150
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.25/src/commands/plugins/update.ts)_
1175
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.5.2/src/commands/plugins/update.ts)_
1151
1176
 
1152
1177
  ## `swaggerhub project:api:add`
1153
1178
 
@@ -1171,7 +1196,7 @@ EXAMPLES
1171
1196
  $ swaggerhub project:api:add organization/project_name my_api
1172
1197
  ```
1173
1198
 
1174
- _See code: [src/commands/project/api/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/api/add.js)_
1199
+ _See code: [src/commands/project/api/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/api/add.js)_
1175
1200
 
1176
1201
  ## `swaggerhub project:api:remove`
1177
1202
 
@@ -1195,7 +1220,7 @@ EXAMPLES
1195
1220
  $ swaggerhub project:api:remove organization/project_name my_api
1196
1221
  ```
1197
1222
 
1198
- _See code: [src/commands/project/api/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/api/remove.js)_
1223
+ _See code: [src/commands/project/api/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/api/remove.js)_
1199
1224
 
1200
1225
  ## `swaggerhub project:create`
1201
1226
 
@@ -1231,7 +1256,7 @@ EXAMPLES
1231
1256
  $ swaggerhub project:create organization/new_project_name -a "testapi1" -d "testdomain3" --description "description"
1232
1257
  ```
1233
1258
 
1234
- _See code: [src/commands/project/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/create.js)_
1259
+ _See code: [src/commands/project/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/create.js)_
1235
1260
 
1236
1261
  ## `swaggerhub project:delete`
1237
1262
 
@@ -1254,7 +1279,7 @@ EXAMPLES
1254
1279
  $ swaggerhub project:delete organization/project_name
1255
1280
  ```
1256
1281
 
1257
- _See code: [src/commands/project/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/delete.js)_
1282
+ _See code: [src/commands/project/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/delete.js)_
1258
1283
 
1259
1284
  ## `swaggerhub project:domain:add`
1260
1285
 
@@ -1278,7 +1303,7 @@ EXAMPLES
1278
1303
  $ swaggerhub project:domain:add organization/project_name my_domain
1279
1304
  ```
1280
1305
 
1281
- _See code: [src/commands/project/domain/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/domain/add.js)_
1306
+ _See code: [src/commands/project/domain/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/domain/add.js)_
1282
1307
 
1283
1308
  ## `swaggerhub project:domain:remove`
1284
1309
 
@@ -1302,7 +1327,7 @@ EXAMPLES
1302
1327
  $ swaggerhub project:domain:remove organization/project_name my_domain
1303
1328
  ```
1304
1329
 
1305
- _See code: [src/commands/project/domain/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/domain/remove.js)_
1330
+ _See code: [src/commands/project/domain/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/domain/remove.js)_
1306
1331
 
1307
1332
  ## `swaggerhub project:get`
1308
1333
 
@@ -1325,7 +1350,7 @@ EXAMPLES
1325
1350
  $ swaggerhub project:get organization/project_name
1326
1351
  ```
1327
1352
 
1328
- _See code: [src/commands/project/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/get.js)_
1353
+ _See code: [src/commands/project/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/get.js)_
1329
1354
 
1330
1355
  ## `swaggerhub project:list`
1331
1356
 
@@ -1350,7 +1375,7 @@ EXAMPLES
1350
1375
  $ swaggerhub project:list organization
1351
1376
  ```
1352
1377
 
1353
- _See code: [src/commands/project/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/list.js)_
1378
+ _See code: [src/commands/project/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/list.js)_
1354
1379
 
1355
1380
  ## `swaggerhub project:member:list`
1356
1381
 
@@ -1373,56 +1398,55 @@ EXAMPLES
1373
1398
  $ swaggerhub project:member:list organisation/project_name
1374
1399
  ```
1375
1400
 
1376
- _See code: [src/commands/project/member/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/project/member/list.js)_
1401
+ _See code: [src/commands/project/member/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/project/member/list.js)_
1377
1402
 
1378
- ## `swaggerhub spectral:upload`
1403
+ ## `swaggerhub spectral:download`
1379
1404
 
1380
- Create or update organization's Spectral ruleset
1405
+ Fetch organization's Spectral ruleset
1381
1406
 
1382
1407
  ```
1383
1408
  USAGE
1384
- $ swaggerhub spectral:upload OWNER/RULESET_NAME directory [-h]
1409
+ $ swaggerhub spectral:download OWNER/RULESET_NAME DIRECTORY [-h]
1385
1410
 
1386
1411
  ARGUMENTS
1387
- OWNER/RULESET_NAME The Spectral ruleset details for SwaggerHub organization
1388
- directory Relative path to directory with ruleset files
1412
+ OWNER/RULESET_NAME Organization's Spectral ruleset to create or update on SwaggerHub
1413
+ DIRECTORY Relative path to directory the ruleset files should be saved to
1389
1414
 
1390
1415
  FLAGS
1391
1416
  -h, --help Show CLI help.
1392
1417
 
1393
1418
  DESCRIPTION
1394
- Create or update organization's Spectral ruleset
1419
+ Fetch organization's Spectral ruleset
1395
1420
 
1396
1421
  EXAMPLES
1397
- $ swaggerhub spectral:upload my_organization/my_api_ruleset rules
1422
+ $ swaggerhub spectral:download my_organization/my_api_ruleset rules/
1398
1423
  ```
1399
1424
 
1400
- _See code: [src/commands/spectral/upload.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/spectral/upload.js)_
1425
+ _See code: [src/commands/spectral/download.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/spectral/download.js)_
1401
1426
 
1427
+ ## `swaggerhub spectral:upload`
1402
1428
 
1403
- ## `swaggerhub spectral:download`
1404
-
1405
- Fetch organization's Spectral ruleset
1429
+ Create or update organization's Spectral ruleset
1406
1430
 
1407
1431
  ```
1408
1432
  USAGE
1409
- $ swaggerhub spectral:download OWNER/RULESET_NAME directory [-h]
1433
+ $ swaggerhub spectral:upload OWNER/RULESET_NAME DIRECTORY [-h]
1410
1434
 
1411
1435
  ARGUMENTS
1412
- OWNER/RULESET_NAME The Spectral ruleset details for SwaggerHub organization
1413
- directory Relative path to directory the ruleset files should be saved to
1436
+ OWNER/RULESET_NAME Organization's Spectral ruleset to create or update on SwaggerHub
1437
+ DIRECTORY Relative path to directory with ruleset files
1414
1438
 
1415
1439
  FLAGS
1416
1440
  -h, --help Show CLI help.
1417
1441
 
1418
1442
  DESCRIPTION
1419
- Fetch organization's Spectral ruleset
1443
+ Create or update organization's Spectral ruleset
1420
1444
 
1421
1445
  EXAMPLES
1422
- $ swaggerhub spectral:download my_organization/my_api_ruleset rules
1446
+ $ swaggerhub spectral:upload my_organization/my_api_ruleset rules/
1423
1447
  ```
1424
1448
 
1425
- _See code: [src/commands/spectral/download.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.9.1/src/commands/spectral/download.js)_
1449
+ _See code: [src/commands/spectral/upload.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.12.1/src/commands/spectral/upload.js)_
1426
1450
  <!-- commandsstop -->
1427
1451
 
1428
1452
  # Plugins
package/bin/run CHANGED
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // Suppress the deprecated punycode module warning
4
+ // https://nodejs.org/api/deprecations.html#deprecations_dep0040_the_punycode_module_is_deprecated
5
+ process.noDeprecation = true;
6
+
3
7
  require('@oclif/core').run()
4
8
  .then(require('@oclif/core/flush'))
5
9
  .catch(require('@oclif/core/handle'))
@@ -832,25 +832,47 @@
832
832
  "update.js"
833
833
  ]
834
834
  },
835
- "integration:create": {
835
+ "project:create": {
836
836
  "aliases": [],
837
837
  "args": {
838
- "OWNER/API_NAME/[VERSION]": {
839
- "description": "API to add integration to on SwaggerHub",
840
- "name": "OWNER/API_NAME/[VERSION]",
838
+ "OWNER/PROJECT_NAME": {
839
+ "description": "The new project to create on Swaggerhub",
840
+ "name": "OWNER/PROJECT_NAME",
841
841
  "required": true
842
842
  }
843
843
  },
844
- "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 be default API version.\n",
844
+ "description": "Creates a new project in SwaggerHub.",
845
845
  "examples": [
846
- "swaggerhub integration:create organization/api/1.0.0 --file config.json"
846
+ "swaggerhub project:create organization/new_project_name --description \"project description\"",
847
+ "swaggerhub project:create organization/new_project_name -a \"testapi1,testapi2\"",
848
+ "swaggerhub project:create organization/new_project_name --apis \"testapi1,testapi2\"",
849
+ "swaggerhub project:create organization/new_project_name -d \"testdomain3,testdomain4\"",
850
+ "swaggerhub project:create organization/new_project_name --domains \"testdomain3,testdomain4\"",
851
+ "swaggerhub project:create organization/new_project_name -a \"testapi1\" -d \"testdomain3\" --description \"description\""
847
852
  ],
848
853
  "flags": {
849
- "file": {
850
- "char": "f",
851
- "description": "location of integration configuration file",
852
- "name": "file",
853
- "required": true,
854
+ "description": {
855
+ "description": "Description of project",
856
+ "name": "description",
857
+ "required": false,
858
+ "hasDynamicHelp": false,
859
+ "multiple": false,
860
+ "type": "option"
861
+ },
862
+ "apis": {
863
+ "char": "a",
864
+ "description": "Comma separated list of api names to include in project",
865
+ "name": "apis",
866
+ "required": false,
867
+ "hasDynamicHelp": false,
868
+ "multiple": false,
869
+ "type": "option"
870
+ },
871
+ "domains": {
872
+ "char": "d",
873
+ "description": "Comma separated list of domain names to include in project",
874
+ "name": "domains",
875
+ "required": false,
854
876
  "hasDynamicHelp": false,
855
877
  "multiple": false,
856
878
  "type": "option"
@@ -865,7 +887,7 @@
865
887
  },
866
888
  "hasDynamicHelp": false,
867
889
  "hiddenAliases": [],
868
- "id": "integration:create",
890
+ "id": "project:create",
869
891
  "pluginAlias": "swaggerhub-cli",
870
892
  "pluginName": "swaggerhub-cli",
871
893
  "pluginType": "core",
@@ -875,22 +897,22 @@
875
897
  "relativePath": [
876
898
  "src",
877
899
  "commands",
878
- "integration",
900
+ "project",
879
901
  "create.js"
880
902
  ]
881
903
  },
882
- "integration:delete": {
904
+ "project:delete": {
883
905
  "aliases": [],
884
906
  "args": {
885
- "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
886
- "description": "Integration to delete for given API on Swaggerhub",
887
- "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
907
+ "OWNER/PROJECT_NAME": {
908
+ "description": "The project to delete on Swaggerhub",
909
+ "name": "OWNER/PROJECT_NAME",
888
910
  "required": true
889
911
  }
890
912
  },
891
- "description": "deletes the integration from the given API.",
913
+ "description": "Deletes a project from SwaggerHub.",
892
914
  "examples": [
893
- "swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
915
+ "swaggerhub project:delete organization/project_name"
894
916
  ],
895
917
  "flags": {
896
918
  "help": {
@@ -903,7 +925,7 @@
903
925
  },
904
926
  "hasDynamicHelp": false,
905
927
  "hiddenAliases": [],
906
- "id": "integration:delete",
928
+ "id": "project:delete",
907
929
  "pluginAlias": "swaggerhub-cli",
908
930
  "pluginName": "swaggerhub-cli",
909
931
  "pluginType": "core",
@@ -913,22 +935,22 @@
913
935
  "relativePath": [
914
936
  "src",
915
937
  "commands",
916
- "integration",
938
+ "project",
917
939
  "delete.js"
918
940
  ]
919
941
  },
920
- "integration:execute": {
942
+ "project:get": {
921
943
  "aliases": [],
922
944
  "args": {
923
- "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
924
- "description": "Integration to execute for given API on Swaggerhub",
925
- "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
945
+ "OWNER/PROJECT_NAME": {
946
+ "description": "The project to get details for on Swaggerhub",
947
+ "name": "OWNER/PROJECT_NAME",
926
948
  "required": true
927
949
  }
928
950
  },
929
- "description": "executes an integration for the given API.",
951
+ "description": "Retrieves the details for a project.",
930
952
  "examples": [
931
- "swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
953
+ "swaggerhub project:get organization/project_name"
932
954
  ],
933
955
  "flags": {
934
956
  "help": {
@@ -941,7 +963,7 @@
941
963
  },
942
964
  "hasDynamicHelp": false,
943
965
  "hiddenAliases": [],
944
- "id": "integration:execute",
966
+ "id": "project:get",
945
967
  "pluginAlias": "swaggerhub-cli",
946
968
  "pluginName": "swaggerhub-cli",
947
969
  "pluginType": "core",
@@ -951,22 +973,23 @@
951
973
  "relativePath": [
952
974
  "src",
953
975
  "commands",
954
- "integration",
955
- "execute.js"
976
+ "project",
977
+ "get.js"
956
978
  ]
957
979
  },
958
- "integration:get": {
980
+ "project:list": {
959
981
  "aliases": [],
960
982
  "args": {
961
- "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
962
- "description": "Integration to fetch for given API on Swaggerhub",
963
- "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
964
- "required": true
983
+ "OWNER": {
984
+ "description": "The organization to list projects for on Swaggerhub",
985
+ "name": "OWNER",
986
+ "required": false
965
987
  }
966
988
  },
967
- "description": "retieves an integration for the given API.",
989
+ "description": "list projects",
968
990
  "examples": [
969
- "swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
991
+ "swaggerhub project:list",
992
+ "swaggerhub project:list organization"
970
993
  ],
971
994
  "flags": {
972
995
  "help": {
@@ -979,7 +1002,7 @@
979
1002
  },
980
1003
  "hasDynamicHelp": false,
981
1004
  "hiddenAliases": [],
982
- "id": "integration:get",
1005
+ "id": "project:list",
983
1006
  "pluginAlias": "swaggerhub-cli",
984
1007
  "pluginName": "swaggerhub-cli",
985
1008
  "pluginType": "core",
@@ -989,24 +1012,33 @@
989
1012
  "relativePath": [
990
1013
  "src",
991
1014
  "commands",
992
- "integration",
993
- "get.js"
1015
+ "project",
1016
+ "list.js"
994
1017
  ]
995
1018
  },
996
- "integration:list": {
1019
+ "integration:create": {
997
1020
  "aliases": [],
998
1021
  "args": {
999
1022
  "OWNER/API_NAME/[VERSION]": {
1000
- "description": "API to list integrations for on Swaggerhub",
1023
+ "description": "API to add integration to on SwaggerHub",
1001
1024
  "name": "OWNER/API_NAME/[VERSION]",
1002
1025
  "required": true
1003
1026
  }
1004
1027
  },
1005
- "description": "list integrations on an API.",
1028
+ "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 be default API version.\n",
1006
1029
  "examples": [
1007
- "swaggerhub integration:list organization/api/1.0.0"
1030
+ "swaggerhub integration:create organization/api/1.0.0 --file config.json"
1008
1031
  ],
1009
1032
  "flags": {
1033
+ "file": {
1034
+ "char": "f",
1035
+ "description": "location of integration configuration file",
1036
+ "name": "file",
1037
+ "required": true,
1038
+ "hasDynamicHelp": false,
1039
+ "multiple": false,
1040
+ "type": "option"
1041
+ },
1010
1042
  "help": {
1011
1043
  "char": "h",
1012
1044
  "description": "Show CLI help.",
@@ -1017,7 +1049,7 @@
1017
1049
  },
1018
1050
  "hasDynamicHelp": false,
1019
1051
  "hiddenAliases": [],
1020
- "id": "integration:list",
1052
+ "id": "integration:create",
1021
1053
  "pluginAlias": "swaggerhub-cli",
1022
1054
  "pluginName": "swaggerhub-cli",
1023
1055
  "pluginType": "core",
@@ -1028,32 +1060,23 @@
1028
1060
  "src",
1029
1061
  "commands",
1030
1062
  "integration",
1031
- "list.js"
1063
+ "create.js"
1032
1064
  ]
1033
1065
  },
1034
- "integration:update": {
1066
+ "integration:delete": {
1035
1067
  "aliases": [],
1036
1068
  "args": {
1037
1069
  "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
1038
- "description": "Integration to update for given API on Swaggerhub",
1070
+ "description": "Integration to delete for given API on Swaggerhub",
1039
1071
  "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
1040
1072
  "required": true
1041
1073
  }
1042
1074
  },
1043
- "description": "update the configuration of an API integration.",
1075
+ "description": "deletes the integration from the given API.",
1044
1076
  "examples": [
1045
- "swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json"
1077
+ "swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
1046
1078
  ],
1047
1079
  "flags": {
1048
- "file": {
1049
- "char": "f",
1050
- "description": "location of integration configuration file",
1051
- "name": "file",
1052
- "required": true,
1053
- "hasDynamicHelp": false,
1054
- "multiple": false,
1055
- "type": "option"
1056
- },
1057
1080
  "help": {
1058
1081
  "char": "h",
1059
1082
  "description": "Show CLI help.",
@@ -1064,7 +1087,7 @@
1064
1087
  },
1065
1088
  "hasDynamicHelp": false,
1066
1089
  "hiddenAliases": [],
1067
- "id": "integration:update",
1090
+ "id": "integration:delete",
1068
1091
  "pluginAlias": "swaggerhub-cli",
1069
1092
  "pluginName": "swaggerhub-cli",
1070
1093
  "pluginType": "core",
@@ -1075,54 +1098,23 @@
1075
1098
  "src",
1076
1099
  "commands",
1077
1100
  "integration",
1078
- "update.js"
1101
+ "delete.js"
1079
1102
  ]
1080
1103
  },
1081
- "project:create": {
1104
+ "integration:execute": {
1082
1105
  "aliases": [],
1083
1106
  "args": {
1084
- "OWNER/PROJECT_NAME": {
1085
- "description": "The new project to create on Swaggerhub",
1086
- "name": "OWNER/PROJECT_NAME",
1107
+ "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
1108
+ "description": "Integration to execute for given API on Swaggerhub",
1109
+ "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
1087
1110
  "required": true
1088
1111
  }
1089
1112
  },
1090
- "description": "Creates a new project in SwaggerHub.",
1113
+ "description": "executes an integration for the given API.",
1091
1114
  "examples": [
1092
- "swaggerhub project:create organization/new_project_name --description \"project description\"",
1093
- "swaggerhub project:create organization/new_project_name -a \"testapi1,testapi2\"",
1094
- "swaggerhub project:create organization/new_project_name --apis \"testapi1,testapi2\"",
1095
- "swaggerhub project:create organization/new_project_name -d \"testdomain3,testdomain4\"",
1096
- "swaggerhub project:create organization/new_project_name --domains \"testdomain3,testdomain4\"",
1097
- "swaggerhub project:create organization/new_project_name -a \"testapi1\" -d \"testdomain3\" --description \"description\""
1115
+ "swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
1098
1116
  ],
1099
1117
  "flags": {
1100
- "description": {
1101
- "description": "Description of project",
1102
- "name": "description",
1103
- "required": false,
1104
- "hasDynamicHelp": false,
1105
- "multiple": false,
1106
- "type": "option"
1107
- },
1108
- "apis": {
1109
- "char": "a",
1110
- "description": "Comma separated list of api names to include in project",
1111
- "name": "apis",
1112
- "required": false,
1113
- "hasDynamicHelp": false,
1114
- "multiple": false,
1115
- "type": "option"
1116
- },
1117
- "domains": {
1118
- "char": "d",
1119
- "description": "Comma separated list of domain names to include in project",
1120
- "name": "domains",
1121
- "required": false,
1122
- "hasDynamicHelp": false,
1123
- "multiple": false,
1124
- "type": "option"
1125
- },
1126
1118
  "help": {
1127
1119
  "char": "h",
1128
1120
  "description": "Show CLI help.",
@@ -1133,7 +1125,7 @@
1133
1125
  },
1134
1126
  "hasDynamicHelp": false,
1135
1127
  "hiddenAliases": [],
1136
- "id": "project:create",
1128
+ "id": "integration:execute",
1137
1129
  "pluginAlias": "swaggerhub-cli",
1138
1130
  "pluginName": "swaggerhub-cli",
1139
1131
  "pluginType": "core",
@@ -1143,22 +1135,22 @@
1143
1135
  "relativePath": [
1144
1136
  "src",
1145
1137
  "commands",
1146
- "project",
1147
- "create.js"
1138
+ "integration",
1139
+ "execute.js"
1148
1140
  ]
1149
1141
  },
1150
- "project:delete": {
1142
+ "integration:get": {
1151
1143
  "aliases": [],
1152
1144
  "args": {
1153
- "OWNER/PROJECT_NAME": {
1154
- "description": "The project to delete on Swaggerhub",
1155
- "name": "OWNER/PROJECT_NAME",
1145
+ "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
1146
+ "description": "Integration to fetch for given API on Swaggerhub",
1147
+ "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
1156
1148
  "required": true
1157
1149
  }
1158
1150
  },
1159
- "description": "Deletes a project from SwaggerHub.",
1151
+ "description": "retieves an integration for the given API.",
1160
1152
  "examples": [
1161
- "swaggerhub project:delete organization/project_name"
1153
+ "swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"
1162
1154
  ],
1163
1155
  "flags": {
1164
1156
  "help": {
@@ -1171,7 +1163,7 @@
1171
1163
  },
1172
1164
  "hasDynamicHelp": false,
1173
1165
  "hiddenAliases": [],
1174
- "id": "project:delete",
1166
+ "id": "integration:get",
1175
1167
  "pluginAlias": "swaggerhub-cli",
1176
1168
  "pluginName": "swaggerhub-cli",
1177
1169
  "pluginType": "core",
@@ -1181,22 +1173,22 @@
1181
1173
  "relativePath": [
1182
1174
  "src",
1183
1175
  "commands",
1184
- "project",
1185
- "delete.js"
1176
+ "integration",
1177
+ "get.js"
1186
1178
  ]
1187
1179
  },
1188
- "project:get": {
1180
+ "integration:list": {
1189
1181
  "aliases": [],
1190
1182
  "args": {
1191
- "OWNER/PROJECT_NAME": {
1192
- "description": "The project to get details for on Swaggerhub",
1193
- "name": "OWNER/PROJECT_NAME",
1183
+ "OWNER/API_NAME/[VERSION]": {
1184
+ "description": "API to list integrations for on Swaggerhub",
1185
+ "name": "OWNER/API_NAME/[VERSION]",
1194
1186
  "required": true
1195
1187
  }
1196
1188
  },
1197
- "description": "Retrieves the details for a project.",
1189
+ "description": "list integrations on an API.",
1198
1190
  "examples": [
1199
- "swaggerhub project:get organization/project_name"
1191
+ "swaggerhub integration:list organization/api/1.0.0"
1200
1192
  ],
1201
1193
  "flags": {
1202
1194
  "help": {
@@ -1209,7 +1201,7 @@
1209
1201
  },
1210
1202
  "hasDynamicHelp": false,
1211
1203
  "hiddenAliases": [],
1212
- "id": "project:get",
1204
+ "id": "integration:list",
1213
1205
  "pluginAlias": "swaggerhub-cli",
1214
1206
  "pluginName": "swaggerhub-cli",
1215
1207
  "pluginType": "core",
@@ -1219,25 +1211,33 @@
1219
1211
  "relativePath": [
1220
1212
  "src",
1221
1213
  "commands",
1222
- "project",
1223
- "get.js"
1214
+ "integration",
1215
+ "list.js"
1224
1216
  ]
1225
1217
  },
1226
- "project:list": {
1218
+ "integration:update": {
1227
1219
  "aliases": [],
1228
1220
  "args": {
1229
- "OWNER": {
1230
- "description": "The organization to list projects for on Swaggerhub",
1231
- "name": "OWNER",
1232
- "required": false
1221
+ "OWNER/API_NAME/VERSION/INTEGRATION_ID": {
1222
+ "description": "Integration to update for given API on Swaggerhub",
1223
+ "name": "OWNER/API_NAME/VERSION/INTEGRATION_ID",
1224
+ "required": true
1233
1225
  }
1234
1226
  },
1235
- "description": "list projects",
1227
+ "description": "update the configuration of an API integration.",
1236
1228
  "examples": [
1237
- "swaggerhub project:list",
1238
- "swaggerhub project:list organization"
1229
+ "swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json"
1239
1230
  ],
1240
1231
  "flags": {
1232
+ "file": {
1233
+ "char": "f",
1234
+ "description": "location of integration configuration file",
1235
+ "name": "file",
1236
+ "required": true,
1237
+ "hasDynamicHelp": false,
1238
+ "multiple": false,
1239
+ "type": "option"
1240
+ },
1241
1241
  "help": {
1242
1242
  "char": "h",
1243
1243
  "description": "Show CLI help.",
@@ -1248,7 +1248,7 @@
1248
1248
  },
1249
1249
  "hasDynamicHelp": false,
1250
1250
  "hiddenAliases": [],
1251
- "id": "project:list",
1251
+ "id": "integration:update",
1252
1252
  "pluginAlias": "swaggerhub-cli",
1253
1253
  "pluginName": "swaggerhub-cli",
1254
1254
  "pluginType": "core",
@@ -1258,8 +1258,8 @@
1258
1258
  "relativePath": [
1259
1259
  "src",
1260
1260
  "commands",
1261
- "project",
1262
- "list.js"
1261
+ "integration",
1262
+ "update.js"
1263
1263
  ]
1264
1264
  },
1265
1265
  "spectral:download": {
@@ -1741,5 +1741,5 @@
1741
1741
  ]
1742
1742
  }
1743
1743
  },
1744
- "version": "0.11.0"
1744
+ "version": "0.12.1"
1745
1745
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "swaggerhub-cli",
3
3
  "description": "SwaggerHub CLI",
4
- "version": "0.11.0",
4
+ "version": "0.12.1",
5
5
  "author": "SmartBear",
6
6
  "bin": {
7
7
  "swaggerhub": "./bin/run"
@@ -15,7 +15,7 @@
15
15
  "deep-extend": "^0.6.0",
16
16
  "fs-extra": "^11.1.1",
17
17
  "inquirer": "^8.2.5",
18
- "js-yaml": "^4.1.0",
18
+ "js-yaml": "^5.2.2",
19
19
  "json-templates": "^5.0.0",
20
20
  "node-fetch": "^2.6.12",
21
21
  "semver": "^7.6.0",
@@ -23,29 +23,30 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@faker-js/faker": "^10.0.0",
26
- "@oclif/test": "^3.2.10",
27
- "chai": "^4.3.10",
28
- "eslint": "^9.0.0",
26
+ "@oclif/test": "^3.2.15",
27
+ "chai": "^6.3.0",
28
+ "eslint": "^10.10.0",
29
29
  "eslint-plugin-chai-friendly": "^1.0.0",
30
30
  "eslint-plugin-immutable": "^1.0.0",
31
- "eslint-plugin-mocha": "^10.1.0",
32
- "eslint-plugin-node": "^11.1.0",
33
- "globby": "^14.0.0",
31
+ "eslint-plugin-mocha": "^11.3.0",
32
+ "eslint-plugin-n": "^18.3.0",
33
+ "globby": "^16.2.0",
34
34
  "husky": "^9.0.1",
35
- "mocha": "^11.7.5",
35
+ "mocha": "^11.7.6",
36
36
  "nock": "^14.0.1",
37
37
  "nyc": "^18.0.0",
38
- "rewire": "^7.0.0",
39
- "sinon": "^19.0.2",
40
- "tmp": "^0.2.5"
38
+ "rewire": "^9.0.1",
39
+ "sinon": "^22.0.0",
40
+ "tmp": "^0.2.7"
41
41
  },
42
42
  "engines": {
43
43
  "node": "^20.17.0 || >=22.9.0",
44
- "npm": ">=11.0.0"
44
+ "npm": ">=11.9.0"
45
45
  },
46
46
  "overrides": {
47
47
  "npm": "^11.9.0",
48
- "glob": "^10.5.0"
48
+ "glob": "^10.5.0",
49
+ "serialize-javascript": "^7.0.5"
49
50
  },
50
51
  "files": [
51
52
  "/bin",
@@ -95,13 +96,9 @@
95
96
  "scripts": {
96
97
  "postpack": "rm -f oclif.manifest.json",
97
98
  "prepack": "npx oclif manifest",
99
+ "prepare": "husky",
98
100
  "test": "nyc mocha --forbid-only \"test/**/*.test.js\"",
99
101
  "lint": "eslint ./src ./test",
100
102
  "postinstall": "node ./src/check-node-version"
101
- },
102
- "husky": {
103
- "hooks": {
104
- "pre-push": "npm run lint && npm run test"
105
- }
106
103
  }
107
104
  }
@@ -3,10 +3,26 @@ const { Args } = require('@oclif/core')
3
3
  const {
4
4
  noVersionRegex,
5
5
  apiNameRegex
6
- } = require("../../support/command/parse-input");
6
+ } = require('../../support/command/parse-input')
7
7
  const { errorMsg } = require('../../template-strings')
8
- const { CLIError } = require("@oclif/core/lib/errors");
9
- const { postApi } = require("../../requests/api");
8
+ const { CLIError } = require('@oclif/core/lib/errors')
9
+ const { postApi } = require('../../requests/api')
10
+
11
+ const getApiToRename = args => {
12
+ const newName = args['OWNER/API_NAME']
13
+ if (!noVersionRegex.test(newName)) {
14
+ throw new CLIError(errorMsg.argsMustMatchFormat({ format: 'OWNER/API_NAME' }))
15
+ }
16
+ return newName
17
+ }
18
+
19
+ const getApiNewName = args => {
20
+ const newName = args['API_NEW_NAME']
21
+ if (!apiNameRegex.test(newName)) {
22
+ throw new CLIError(errorMsg.argsMustMatchFormat({ format: 'API_NEW_NAME' }))
23
+ }
24
+ return newName
25
+ }
10
26
 
11
27
  class RenameApiCommand extends BaseCommand {
12
28
 
@@ -25,32 +41,16 @@ class RenameApiCommand extends BaseCommand {
25
41
  queryParams: { 'newName': newName },
26
42
  body: '{}'
27
43
  }),
28
- onResolve: this.logCommandSuccess({apiPath, newName}),
44
+ onResolve: this.logCommandSuccess({ apiPath, newName }),
29
45
  options: {}
30
46
  })
31
47
  }
32
48
  }
33
49
 
34
- const getApiToRename = args => {
35
- const newName = args['OWNER/API_NAME']
36
- if (!noVersionRegex.test(newName)) {
37
- throw new CLIError(errorMsg.argsMustMatchFormat({format: 'OWNER/API_NAME'}))
38
- }
39
- return newName
40
- }
41
-
42
- const getApiNewName = args => {
43
- const newName = args['API_NEW_NAME']
44
- if (!apiNameRegex.test(newName)) {
45
- throw new CLIError(errorMsg.argsMustMatchFormat({format: 'API_NEW_NAME'}))
46
- }
47
- return newName
48
- }
49
-
50
- RenameApiCommand.description = "rename an API"
50
+ RenameApiCommand.description = 'rename an API'
51
51
 
52
52
  RenameApiCommand.examples = [
53
- "swaggerhub api:rename organization/apiOldName apiNewName"
53
+ 'swaggerhub api:rename organization/apiOldName apiNewName'
54
54
  ]
55
55
 
56
56
  RenameApiCommand.args = {
@@ -12,7 +12,9 @@ class ValidateDownloadRulesCommand extends BaseCommand {
12
12
  const includeDisabledRules = flags['include-disabled-rules'] ?? false
13
13
  const organization = args['OWNER']
14
14
 
15
- const organizationRuleset = await this.getExportedOrganizationRuleset(organization, {includeSystemRules, includeDisabledRules})
15
+ const organizationRuleset = await this.getExportedOrganizationRuleset(
16
+ organization, { includeSystemRules, includeDisabledRules }
17
+ )
16
18
  this.log(JSON.stringify(organizationRuleset, null, 2))
17
19
  }
18
20
 
@@ -12,7 +12,7 @@ class ValidateCommand extends BaseValidateCommand {
12
12
  const apiPath = getApiIdentifierArg(args)
13
13
  const validPath = await this.ensureVersion(apiPath)
14
14
  await this.checkApiExists(validPath)
15
- // eslint-disable-next-line immutable/no-let
15
+
16
16
  let validationResult = await this.getValidationResult(validPath)
17
17
  // Required to support On-Prem 2.4.1
18
18
  if (validationResult.validation.length === 0 && isOnPrem()) {
@@ -3,8 +3,8 @@ const { getSpectralRuleset } = require('../../requests/spectral')
3
3
  const { getSpectralIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
4
4
  const { errorMsg } = require('../../template-strings')
5
5
  const BaseCommand = require('../../support/command/base-command')
6
- const unzipper = require('unzipper');
7
- const fs = require('fs');
6
+ const unzipper = require('unzipper')
7
+ const fs = require('fs')
8
8
 
9
9
  class DownloadSpectralRulesetCommand extends BaseCommand {
10
10
  async run() {
@@ -23,10 +23,10 @@ class DownloadSpectralRulesetCommand extends BaseCommand {
23
23
  }
24
24
 
25
25
  async extractZipResponse(response, outputDir) {
26
- const buffer = Buffer.from(response.content, 'binary');
26
+ const buffer = Buffer.from(response.content, 'binary')
27
27
  await this.createDirectory(outputDir)
28
- const directory = await unzipper.Open.buffer(buffer);
29
- await directory.extract({ path: outputDir });
28
+ const directory = await unzipper.Open.buffer(buffer)
29
+ await directory.extract({ path: outputDir })
30
30
  }
31
31
 
32
32
  async createDirectory(outputDir) {
@@ -45,7 +45,7 @@ class DownloadSpectralRulesetCommand extends BaseCommand {
45
45
  }
46
46
  }
47
47
 
48
- DownloadSpectralRulesetCommand.description = `Fetch organization's Spectral ruleset`
48
+ DownloadSpectralRulesetCommand.description = 'Fetch organization\'s Spectral ruleset'
49
49
 
50
50
  DownloadSpectralRulesetCommand.examples = [
51
51
  'swaggerhub spectral:download my_organization/my_api_ruleset rules/',
@@ -1,5 +1,5 @@
1
1
  const { Args } = require('@oclif/core')
2
- const {saveSpectralRuleset} = require('../../requests/spectral')
2
+ const { saveSpectralRuleset } = require('../../requests/spectral')
3
3
  const { getSpectralIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
4
4
  const BaseCommand = require('../../support/command/base-command')
5
5
  const { PassThrough } = require('stream')
@@ -17,13 +17,13 @@ class UploadSpectralRulesetCommand extends BaseCommand {
17
17
  }
18
18
 
19
19
  async zipTheDirectory(directoryPath) {
20
- const archive = archiver('zip', { zlib: { level: 9 } });
21
- const passthrough = new PassThrough();
20
+ const archive = archiver('zip', { zlib: { level: 9 } })
21
+ const passthrough = new PassThrough()
22
22
 
23
- archive.directory(directoryPath, false);
24
- archive.finalize();
25
- archive.pipe(passthrough);
26
- return passthrough;
23
+ archive.directory(directoryPath, false)
24
+ await archive.finalize()
25
+ archive.pipe(passthrough)
26
+ return passthrough
27
27
  }
28
28
 
29
29
  saveSpectralRuleset(pathParams, zippedDirectory) {
@@ -35,7 +35,7 @@ class UploadSpectralRulesetCommand extends BaseCommand {
35
35
  }
36
36
  }
37
37
 
38
- UploadSpectralRulesetCommand.description = `Create or update organization's Spectral ruleset`
38
+ UploadSpectralRulesetCommand.description = 'Create or update organization\'s Spectral ruleset'
39
39
 
40
40
  UploadSpectralRulesetCommand.examples = [
41
41
  'swaggerhub spectral:upload my_organization/my_api_ruleset rules/',
@@ -13,7 +13,7 @@ const saveSpectralRuleset = (pathParams, body) => {
13
13
  })
14
14
  }
15
15
 
16
- const getSpectralRuleset = (pathParams) => {
16
+ const getSpectralRuleset = pathParams => {
17
17
  const { SWAGGERHUB_URL, SWAGGERHUB_API_KEY } = config.getConfig()
18
18
 
19
19
  return http({
@@ -8,15 +8,15 @@ const parseResponse = response => new Promise(resolve => {
8
8
  status: response.status,
9
9
  ok: response.ok,
10
10
  content,
11
- });
11
+ })
12
12
 
13
- const contentType = response.headers?.get('content-type') || '';
13
+ const contentType = response.headers?.get('content-type') || ''
14
14
  if (contentType.includes('application/zip')) {
15
15
  response.buffer().then(resolveContent)
16
16
  } else {
17
17
  response.text().then(resolveContent)
18
18
  }
19
- });
19
+ })
20
20
 
21
21
  const checkForErrors = ({ resolveStatus = [] } = {}) => response => {
22
22
  if (resolveStatus.includes(response.status) || response.ok) {