swaggerhub-cli 0.6.2 → 0.6.3

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
@@ -170,7 +170,7 @@ EXAMPLES
170
170
  swaggerhub api:create organization/api/1.0.0 --published=publish --setdefault --file api.json
171
171
  ```
172
172
 
173
- _See code: [src/commands/api/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/api/create.js)_
173
+ _See code: [src/commands/api/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/api/create.js)_
174
174
 
175
175
  ## `swaggerhub api:delete`
176
176
 
@@ -193,7 +193,7 @@ EXAMPLES
193
193
  swaggerhub api:delete organization/api --force
194
194
  ```
195
195
 
196
- _See code: [src/commands/api/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/api/delete.js)_
196
+ _See code: [src/commands/api/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/api/delete.js)_
197
197
 
198
198
  ## `swaggerhub api:get`
199
199
 
@@ -220,7 +220,7 @@ EXAMPLES
220
220
  swaggerhub api:get organization/api/1.0.0 --json
221
221
  ```
222
222
 
223
- _See code: [src/commands/api/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/api/get.js)_
223
+ _See code: [src/commands/api/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/api/get.js)_
224
224
 
225
225
  ## `swaggerhub api:publish`
226
226
 
@@ -240,7 +240,7 @@ EXAMPLE
240
240
  swaggerhub api:publish organization/api/1.0.0
241
241
  ```
242
242
 
243
- _See code: [src/commands/api/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/api/publish.js)_
243
+ _See code: [src/commands/api/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/api/publish.js)_
244
244
 
245
245
  ## `swaggerhub api:setdefault`
246
246
 
@@ -260,7 +260,7 @@ EXAMPLE
260
260
  swaggerhub api:setdefault organization/api/2.0.0
261
261
  ```
262
262
 
263
- _See code: [src/commands/api/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/api/setdefault.js)_
263
+ _See code: [src/commands/api/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/api/setdefault.js)_
264
264
 
265
265
  ## `swaggerhub api:unpublish`
266
266
 
@@ -280,7 +280,7 @@ EXAMPLE
280
280
  swaggerhub api:unpublish organization/api/1.0.0
281
281
  ```
282
282
 
283
- _See code: [src/commands/api/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/api/unpublish.js)_
283
+ _See code: [src/commands/api/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/api/unpublish.js)_
284
284
 
285
285
  ## `swaggerhub api:update`
286
286
 
@@ -314,7 +314,7 @@ EXAMPLES
314
314
  swaggerhub api:update organization/api/1.0.0 --visibility=private
315
315
  ```
316
316
 
317
- _See code: [src/commands/api/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/api/update.js)_
317
+ _See code: [src/commands/api/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/api/update.js)_
318
318
 
319
319
  ## `swaggerhub api:validate`
320
320
 
@@ -339,7 +339,7 @@ EXAMPLES
339
339
  swaggerhub api:validate organization/api
340
340
  ```
341
341
 
342
- _See code: [src/commands/api/validate.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/api/validate.js)_
342
+ _See code: [src/commands/api/validate.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/api/validate.js)_
343
343
 
344
344
  ## `swaggerhub configure`
345
345
 
@@ -361,7 +361,7 @@ DESCRIPTION
361
361
  settings.
362
362
  ```
363
363
 
364
- _See code: [src/commands/configure.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/configure.js)_
364
+ _See code: [src/commands/configure.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/configure.js)_
365
365
 
366
366
  ## `swaggerhub domain:create`
367
367
 
@@ -393,7 +393,7 @@ EXAMPLES
393
393
  swaggerhub domain:create organization/domain/1.0.0 --publish --setdefault --file domain.json
394
394
  ```
395
395
 
396
- _See code: [src/commands/domain/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/domain/create.js)_
396
+ _See code: [src/commands/domain/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/domain/create.js)_
397
397
 
398
398
  ## `swaggerhub domain:delete`
399
399
 
@@ -416,7 +416,7 @@ EXAMPLES
416
416
  swaggerhub domain:delete organization/domain --force
417
417
  ```
418
418
 
419
- _See code: [src/commands/domain/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/domain/delete.js)_
419
+ _See code: [src/commands/domain/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/domain/delete.js)_
420
420
 
421
421
  ## `swaggerhub domain:get`
422
422
 
@@ -442,7 +442,7 @@ EXAMPLES
442
442
  swaggerhub domain:get organization/domain/1.0.0 --json
443
443
  ```
444
444
 
445
- _See code: [src/commands/domain/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/domain/get.js)_
445
+ _See code: [src/commands/domain/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/domain/get.js)_
446
446
 
447
447
  ## `swaggerhub domain:publish`
448
448
 
@@ -462,7 +462,7 @@ EXAMPLE
462
462
  swaggerhub domain:publish organization/domain/1.0.0
463
463
  ```
464
464
 
465
- _See code: [src/commands/domain/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/domain/publish.js)_
465
+ _See code: [src/commands/domain/publish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/domain/publish.js)_
466
466
 
467
467
  ## `swaggerhub domain:setdefault`
468
468
 
@@ -482,7 +482,7 @@ EXAMPLE
482
482
  swaggerhub domain:setdefault organization/domain/2.0.0
483
483
  ```
484
484
 
485
- _See code: [src/commands/domain/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/domain/setdefault.js)_
485
+ _See code: [src/commands/domain/setdefault.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/domain/setdefault.js)_
486
486
 
487
487
  ## `swaggerhub domain:unpublish`
488
488
 
@@ -502,7 +502,7 @@ EXAMPLE
502
502
  swaggerhub domain:unpublish organization/domain/1.0.0
503
503
  ```
504
504
 
505
- _See code: [src/commands/domain/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/domain/unpublish.js)_
505
+ _See code: [src/commands/domain/unpublish.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/domain/unpublish.js)_
506
506
 
507
507
  ## `swaggerhub domain:update`
508
508
 
@@ -536,7 +536,7 @@ EXAMPLES
536
536
  swaggerhub domain:update organization/domain/1.0.0 --visibility=private
537
537
  ```
538
538
 
539
- _See code: [src/commands/domain/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/domain/update.js)_
539
+ _See code: [src/commands/domain/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/domain/update.js)_
540
540
 
541
541
  ## `swaggerhub help`
542
542
 
@@ -579,7 +579,7 @@ EXAMPLE
579
579
  swaggerhub integration:create organization/api/1.0.0 --file config.json
580
580
  ```
581
581
 
582
- _See code: [src/commands/integration/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/integration/create.js)_
582
+ _See code: [src/commands/integration/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/integration/create.js)_
583
583
 
584
584
  ## `swaggerhub integration:delete`
585
585
 
@@ -599,7 +599,7 @@ EXAMPLE
599
599
  swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
600
600
  ```
601
601
 
602
- _See code: [src/commands/integration/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/integration/delete.js)_
602
+ _See code: [src/commands/integration/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/integration/delete.js)_
603
603
 
604
604
  ## `swaggerhub integration:execute`
605
605
 
@@ -619,7 +619,7 @@ EXAMPLE
619
619
  swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
620
620
  ```
621
621
 
622
- _See code: [src/commands/integration/execute.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/integration/execute.js)_
622
+ _See code: [src/commands/integration/execute.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/integration/execute.js)_
623
623
 
624
624
  ## `swaggerhub integration:get`
625
625
 
@@ -639,7 +639,7 @@ EXAMPLE
639
639
  swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704
640
640
  ```
641
641
 
642
- _See code: [src/commands/integration/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/integration/get.js)_
642
+ _See code: [src/commands/integration/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/integration/get.js)_
643
643
 
644
644
  ## `swaggerhub integration:list`
645
645
 
@@ -659,7 +659,7 @@ EXAMPLE
659
659
  swaggerhub integration:list organization/api/1.0.0
660
660
  ```
661
661
 
662
- _See code: [src/commands/integration/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/integration/list.js)_
662
+ _See code: [src/commands/integration/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/integration/list.js)_
663
663
 
664
664
  ## `swaggerhub integration:update`
665
665
 
@@ -680,7 +680,7 @@ EXAMPLE
680
680
  swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json
681
681
  ```
682
682
 
683
- _See code: [src/commands/integration/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/integration/update.js)_
683
+ _See code: [src/commands/integration/update.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/integration/update.js)_
684
684
 
685
685
  ## `swaggerhub plugins`
686
686
 
@@ -839,7 +839,7 @@ EXAMPLE
839
839
  swaggerhub project:api:add organization/project_name my_api
840
840
  ```
841
841
 
842
- _See code: [src/commands/project/api/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/api/add.js)_
842
+ _See code: [src/commands/project/api/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/api/add.js)_
843
843
 
844
844
  ## `swaggerhub project:api:remove`
845
845
 
@@ -860,7 +860,7 @@ EXAMPLE
860
860
  swaggerhub project:api:remove organization/project_name my_api
861
861
  ```
862
862
 
863
- _See code: [src/commands/project/api/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/api/remove.js)_
863
+ _See code: [src/commands/project/api/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/api/remove.js)_
864
864
 
865
865
  ## `swaggerhub project:create`
866
866
 
@@ -888,7 +888,7 @@ EXAMPLES
888
888
  swaggerhub project:create organization/new_project_name -a "testapi1" -d "testdomain3" --description "description"
889
889
  ```
890
890
 
891
- _See code: [src/commands/project/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/create.js)_
891
+ _See code: [src/commands/project/create.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/create.js)_
892
892
 
893
893
  ## `swaggerhub project:delete`
894
894
 
@@ -908,7 +908,7 @@ EXAMPLE
908
908
  swaggerhub project:delete organization/project_name
909
909
  ```
910
910
 
911
- _See code: [src/commands/project/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/delete.js)_
911
+ _See code: [src/commands/project/delete.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/delete.js)_
912
912
 
913
913
  ## `swaggerhub project:domain:add`
914
914
 
@@ -929,7 +929,7 @@ EXAMPLE
929
929
  swaggerhub project:domain:add organization/project_name my_domain
930
930
  ```
931
931
 
932
- _See code: [src/commands/project/domain/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/domain/add.js)_
932
+ _See code: [src/commands/project/domain/add.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/domain/add.js)_
933
933
 
934
934
  ## `swaggerhub project:domain:remove`
935
935
 
@@ -950,7 +950,7 @@ EXAMPLE
950
950
  swaggerhub project:domain:remove organization/project_name my_domain
951
951
  ```
952
952
 
953
- _See code: [src/commands/project/domain/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/domain/remove.js)_
953
+ _See code: [src/commands/project/domain/remove.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/domain/remove.js)_
954
954
 
955
955
  ## `swaggerhub project:get`
956
956
 
@@ -970,7 +970,7 @@ EXAMPLE
970
970
  swaggerhub project:get organization/project_name
971
971
  ```
972
972
 
973
- _See code: [src/commands/project/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/get.js)_
973
+ _See code: [src/commands/project/get.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/get.js)_
974
974
 
975
975
  ## `swaggerhub project:list`
976
976
 
@@ -991,7 +991,7 @@ EXAMPLES
991
991
  swaggerhub project:list organization
992
992
  ```
993
993
 
994
- _See code: [src/commands/project/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/list.js)_
994
+ _See code: [src/commands/project/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/list.js)_
995
995
 
996
996
  ## `swaggerhub project:member:list`
997
997
 
@@ -1011,7 +1011,7 @@ EXAMPLE
1011
1011
  swaggerhub project:member:list organisation/project_name
1012
1012
  ```
1013
1013
 
1014
- _See code: [src/commands/project/member/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.2/src/commands/project/member/list.js)_
1014
+ _See code: [src/commands/project/member/list.js](https://github.com/SmartBear/swaggerhub-cli/blob/v0.6.3/src/commands/project/member/list.js)_
1015
1015
  <!-- commandsstop -->
1016
1016
 
1017
1017
  # Plugins
@@ -1 +1 @@
1
- {"version":"0.6.2","commands":{"configure":{"id":"configure","description":"configure application settings\nEnter the SwaggerHub URL - default is https://api.swaggerhub.com\nCustomers with on-premise installations need to point this to their on-premise API, which is http(s)://{swaggerhub-host}/v1\nEnter the API Key - this can be retrieved from https://app.swaggerhub.com/settings/apiKey\nYou can set these as environment variables: SWAGGERHUB_URL, SWAGGERHUB_API_KEY. These take priority over config settings.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"api:create":{"id":"api:create","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","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:create organization/api/1.0.0 --file api.yaml --visibility public","swaggerhub api:create organization/api --file api.yaml","swaggerhub api:create organization/api/1.0.0 --published=publish --file api.json","swaggerhub api:create organization/api/1.0.0 --setdefault --file api.json","swaggerhub api:create organization/api/1.0.0 --published=publish --setdefault --file api.json"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"file location of API to create","required":true},"visibility":{"name":"visibility","type":"option","description":"visibility of API in SwaggerHub","options":["public","private"],"default":"private"},"published":{"name":"published","type":"option","description":"sets the lifecycle setting of the API version","required":false,"options":["publish","unpublish"],"default":"unpublish"},"setdefault":{"name":"setdefault","type":"boolean","description":"sets API version to be the default","required":false,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API to create in SwaggerHub","required":true}]},"api:delete":{"id":"api:delete","description":"delete an API or API version\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:delete organization/api/1.0.0","swaggerhub api:delete organization/api","swaggerhub api:delete organization/api --force"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"delete API without prompting for confirmation","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API to delete in SwaggerHub","required":true}]},"api:get":{"id":"api:get","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","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:get organization/api","swaggerhub api:get organization/api/1.0.0 --json"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"returns the API in JSON format.","allowNo":false},"resolved":{"name":"resolved","type":"boolean","char":"r","description":"gets the resolved API definition (supported in v1.25+). ","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"SwaggerHub API to fetch","required":true}]},"api:publish":{"id":"api:publish","description":"publish an API version","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:publish organization/api/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION","description":"API identifier","required":true}]},"api:setdefault":{"id":"api:setdefault","description":"set the default version of an API","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:setdefault organization/api/2.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION","description":"API identifier","required":true}]},"api:unpublish":{"id":"api:unpublish","description":"unpublish an API version","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:unpublish organization/api/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION","description":"API identifier","required":true}]},"api:update":{"id":"api:update","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 visibility flag.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:update organization/api --file api.yaml","swaggerhub api:update organization/api/1.0.0 --file api.json","swaggerhub api:update organization/api/1.0.0 --published=publish --file api.json","swaggerhub api:update organization/api/1.0.0 --setdefault --file api.json","swaggerhub api:update organization/api/1.0.0 --published=unpublish --setdefault --file api.json","swaggerhub api:update organization/api/1.0.0 --visibility=private"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"file location of API to update","required":false},"visibility":{"name":"visibility","type":"option","description":"visibility of API in SwaggerHub","options":["public","private"]},"published":{"name":"published","type":"option","description":"sets the lifecycle setting of the API version","required":false,"options":["publish","unpublish"]},"setdefault":{"name":"setdefault","type":"boolean","description":"sets API version to be the default","required":false,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API to update in SwaggerHub","required":true}]},"api:validate":{"id":"api:validate","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.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:validate organization/api/1.0.0","swaggerhub api:validate organization/api"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API Identifier","required":true}]},"domain:create":{"id":"domain:create","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","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:create organization/domain/1.0.0 --file domain.yaml --visibility public","swaggerhub domain:create organization/domain --file domain.yaml","swaggerhub domain:create organization/domain/1.0.0 --publish --file domain.json","swaggerhub domain:create organization/domain/1.0.0 --setdefault --file domain.json","swaggerhub domain:create organization/domain/1.0.0 --publish --setdefault --file domain.json"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"file location of domain to create","required":true},"visibility":{"name":"visibility","type":"option","description":"visibility of domain in SwaggerHub","options":["public","private"],"default":"private"},"published":{"name":"published","type":"option","description":"sets the lifecycle setting of the domain version","required":false,"options":["publish","unpublish"],"default":"unpublish"},"setdefault":{"name":"setdefault","type":"boolean","description":"sets domain version to be the default","required":false,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/[VERSION]","description":"Domain to create in SwaggerHub","required":true}]},"domain:delete":{"id":"domain:delete","description":"delete a domain or domain version\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:delete organization/domain/1.0.0","swaggerhub domain:delete organization/domain","swaggerhub domain:delete organization/domain --force"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"delete domain without prompting for confirmation","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/[VERSION]","description":"Domain to delete in SwaggerHub","required":true}]},"domain:get":{"id":"domain:get","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","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:get organization/domain","swaggerhub domain:get organization/domain/1.0.0 --json"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"returns the domain in JSON format.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/[VERSION]","description":"SwaggerHub domain to fetch","required":true}]},"domain:publish":{"id":"domain:publish","description":"publish a domain version","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:publish organization/domain/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/VERSION","description":"Domain identifier","required":true}]},"domain:setdefault":{"id":"domain:setdefault","description":"set the default version of a domain","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:setdefault organization/domain/2.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/VERSION","description":"domain identifier","required":true}]},"domain:unpublish":{"id":"domain:unpublish","description":"unpublish a domain version","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:unpublish organization/domain/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/VERSION","description":"Domain identifier","required":true}]},"domain:update":{"id":"domain:update","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 visibility flag.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:update organization/domain --file domain.yaml","swaggerhub domain:update organization/domain/1.0.0 --file domain.json","swaggerhub domain:update organization/domain/1.0.0 --published=publish --file domain.json","swaggerhub domain:update organization/domain/1.0.0 --setdefault --file domain.json","swaggerhub domain:update organization/domain/1.0.0 --published=unpublish --setdefault --file domain.json","swaggerhub domain:update organization/domain/1.0.0 --visibility=private"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"file location of domain to update","required":false},"visibility":{"name":"visibility","type":"option","description":"visibility of domain in SwaggerHub","options":["public","private"]},"published":{"name":"published","type":"option","description":"sets the lifecycle setting of the domain version","required":false,"options":["publish","unpublish"]},"setdefault":{"name":"setdefault","type":"boolean","description":"sets domain version to be the default","required":false,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/[VERSION]","description":"domain to update in SwaggerHub","required":true}]},"integration:create":{"id":"integration:create","description":"creates a new API integration from a JSON configuration file.\nSee the documentation for configuration files: https://github.com/SmartBear/swaggerhub-cli/tree/master/examples/integrations\nWhen VERSION is not included in the argument, the integration will be added to be default API version.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:create organization/api/1.0.0 --file config.json"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"location of integration configuration file","required":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API where integration will be added","required":true}]},"integration:delete":{"id":"integration:delete","description":"deletes the integration from the given API.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION/INTEGRATION_ID","description":"Integration to delete","required":true}]},"integration:execute":{"id":"integration:execute","description":"executes an integration for the given API.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION/INTEGRATION_ID","description":"Integration to execute for given API","required":true}]},"integration:get":{"id":"integration:get","description":"retieves an integration for the given API.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION/INTEGRATION_ID","description":"Integration to fetch for given API","required":true}]},"integration:list":{"id":"integration:list","description":"list integrations on an API.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:list organization/api/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API to list integrations on","required":true}]},"integration:update":{"id":"integration:update","description":"update the configuration of an API integration.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"location of integration configuration file","required":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION/INTEGRATION_ID","description":"Integration to update on the given API","required":true}]},"project:create":{"id":"project:create","description":"Creates a new project in SwaggerHub.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:create organization/new_project_name --description \"project description\"","swaggerhub project:create organization/new_project_name -a \"testapi1,testapi2\"","swaggerhub project:create organization/new_project_name --apis \"testapi1,testapi2\"","swaggerhub project:create organization/new_project_name -d \"testdomain3,testdomain4\"","swaggerhub project:create organization/new_project_name --domains \"testdomain3,testdomain4\"","swaggerhub project:create organization/new_project_name -a \"testapi1\" -d \"testdomain3\" --description \"description\""],"flags":{"description":{"name":"description","type":"option","description":"Description of project","required":false},"apis":{"name":"apis","type":"option","char":"a","description":"Comma separated list of api names to include in project","required":false},"domains":{"name":"domains","type":"option","char":"d","description":"Comma separated list of domain names to include in project","required":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The new project to create","required":true}]},"project:delete":{"id":"project:delete","description":"Deletes a project from SwaggerHub.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:delete organization/project_name"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"Project to delete","required":true}]},"project:get":{"id":"project:get","description":"Retrieves the details for a project.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:get organization/project_name"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"Project to retrieve the details for","required":true}]},"project:list":{"id":"project:list","description":"list projects","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:list","swaggerhub project:list organization"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER","description":"Organization to list projects for","required":false}]},"project:api:add":{"id":"project:api:add","description":"Adds an API to an existing project.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:api:add organization/project_name my_api"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The project to add the API to","required":true},{"name":"API","description":"The name of the API to add","required":true}]},"project:api:remove":{"id":"project:api:remove","description":"Removes an API from a project in SwaggerHub.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:api:remove organization/project_name my_api"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The project remove the API from","required":true},{"name":"API","description":"The API to remove","required":true}]},"project:domain:add":{"id":"project:domain:add","description":"Adds a domain to an existing project.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:domain:add organization/project_name my_domain"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The project to add the domain to","required":true},{"name":"DOMAIN","description":"The name of the domain to add","required":true}]},"project:domain:remove":{"id":"project:domain:remove","description":"Removes a domain from a project in SwaggerHub.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:domain:remove organization/project_name my_domain"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The project remove the domain from","required":true},{"name":"DOMAIN","description":"The domain to remove","required":true}]},"project:member:list":{"id":"project:member:list","description":"list members of a project","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:member:list organisation/project_name"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"Project to list members of","required":true}]}}}
1
+ {"version":"0.6.3","commands":{"configure":{"id":"configure","description":"configure application settings\nEnter the SwaggerHub URL - default is https://api.swaggerhub.com\nCustomers with on-premise installations need to point this to their on-premise API, which is http(s)://{swaggerhub-host}/v1\nEnter the API Key - this can be retrieved from https://app.swaggerhub.com/settings/apiKey\nYou can set these as environment variables: SWAGGERHUB_URL, SWAGGERHUB_API_KEY. These take priority over config settings.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"api:create":{"id":"api:create","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","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:create organization/api/1.0.0 --file api.yaml --visibility public","swaggerhub api:create organization/api --file api.yaml","swaggerhub api:create organization/api/1.0.0 --published=publish --file api.json","swaggerhub api:create organization/api/1.0.0 --setdefault --file api.json","swaggerhub api:create organization/api/1.0.0 --published=publish --setdefault --file api.json"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"file location of API to create","required":true},"visibility":{"name":"visibility","type":"option","description":"visibility of API in SwaggerHub","options":["public","private"],"default":"private"},"published":{"name":"published","type":"option","description":"sets the lifecycle setting of the API version","required":false,"options":["publish","unpublish"],"default":"unpublish"},"setdefault":{"name":"setdefault","type":"boolean","description":"sets API version to be the default","required":false,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API to create in SwaggerHub","required":true}]},"api:delete":{"id":"api:delete","description":"delete an API or API version\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:delete organization/api/1.0.0","swaggerhub api:delete organization/api","swaggerhub api:delete organization/api --force"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"delete API without prompting for confirmation","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API to delete in SwaggerHub","required":true}]},"api:get":{"id":"api:get","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","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:get organization/api","swaggerhub api:get organization/api/1.0.0 --json"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"returns the API in JSON format.","allowNo":false},"resolved":{"name":"resolved","type":"boolean","char":"r","description":"gets the resolved API definition (supported in v1.25+). ","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"SwaggerHub API to fetch","required":true}]},"api:publish":{"id":"api:publish","description":"publish an API version","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:publish organization/api/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION","description":"API identifier","required":true}]},"api:setdefault":{"id":"api:setdefault","description":"set the default version of an API","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:setdefault organization/api/2.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION","description":"API identifier","required":true}]},"api:unpublish":{"id":"api:unpublish","description":"unpublish an API version","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:unpublish organization/api/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION","description":"API identifier","required":true}]},"api:update":{"id":"api:update","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 visibility flag.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:update organization/api --file api.yaml","swaggerhub api:update organization/api/1.0.0 --file api.json","swaggerhub api:update organization/api/1.0.0 --published=publish --file api.json","swaggerhub api:update organization/api/1.0.0 --setdefault --file api.json","swaggerhub api:update organization/api/1.0.0 --published=unpublish --setdefault --file api.json","swaggerhub api:update organization/api/1.0.0 --visibility=private"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"file location of API to update","required":false},"visibility":{"name":"visibility","type":"option","description":"visibility of API in SwaggerHub","options":["public","private"]},"published":{"name":"published","type":"option","description":"sets the lifecycle setting of the API version","required":false,"options":["publish","unpublish"]},"setdefault":{"name":"setdefault","type":"boolean","description":"sets API version to be the default","required":false,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API to update in SwaggerHub","required":true}]},"api:validate":{"id":"api:validate","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.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub api:validate organization/api/1.0.0","swaggerhub api:validate organization/api"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API Identifier","required":true}]},"domain:create":{"id":"domain:create","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","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:create organization/domain/1.0.0 --file domain.yaml --visibility public","swaggerhub domain:create organization/domain --file domain.yaml","swaggerhub domain:create organization/domain/1.0.0 --publish --file domain.json","swaggerhub domain:create organization/domain/1.0.0 --setdefault --file domain.json","swaggerhub domain:create organization/domain/1.0.0 --publish --setdefault --file domain.json"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"file location of domain to create","required":true},"visibility":{"name":"visibility","type":"option","description":"visibility of domain in SwaggerHub","options":["public","private"],"default":"private"},"published":{"name":"published","type":"option","description":"sets the lifecycle setting of the domain version","required":false,"options":["publish","unpublish"],"default":"unpublish"},"setdefault":{"name":"setdefault","type":"boolean","description":"sets domain version to be the default","required":false,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/[VERSION]","description":"Domain to create in SwaggerHub","required":true}]},"domain:delete":{"id":"domain:delete","description":"delete a domain or domain version\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:delete organization/domain/1.0.0","swaggerhub domain:delete organization/domain","swaggerhub domain:delete organization/domain --force"],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"delete domain without prompting for confirmation","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/[VERSION]","description":"Domain to delete in SwaggerHub","required":true}]},"domain:get":{"id":"domain:get","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","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:get organization/domain","swaggerhub domain:get organization/domain/1.0.0 --json"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"returns the domain in JSON format.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/[VERSION]","description":"SwaggerHub domain to fetch","required":true}]},"domain:publish":{"id":"domain:publish","description":"publish a domain version","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:publish organization/domain/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/VERSION","description":"Domain identifier","required":true}]},"domain:setdefault":{"id":"domain:setdefault","description":"set the default version of a domain","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:setdefault organization/domain/2.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/VERSION","description":"domain identifier","required":true}]},"domain:unpublish":{"id":"domain:unpublish","description":"unpublish a domain version","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:unpublish organization/domain/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/VERSION","description":"Domain identifier","required":true}]},"domain:update":{"id":"domain:update","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 visibility flag.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub domain:update organization/domain --file domain.yaml","swaggerhub domain:update organization/domain/1.0.0 --file domain.json","swaggerhub domain:update organization/domain/1.0.0 --published=publish --file domain.json","swaggerhub domain:update organization/domain/1.0.0 --setdefault --file domain.json","swaggerhub domain:update organization/domain/1.0.0 --published=unpublish --setdefault --file domain.json","swaggerhub domain:update organization/domain/1.0.0 --visibility=private"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"file location of domain to update","required":false},"visibility":{"name":"visibility","type":"option","description":"visibility of domain in SwaggerHub","options":["public","private"]},"published":{"name":"published","type":"option","description":"sets the lifecycle setting of the domain version","required":false,"options":["publish","unpublish"]},"setdefault":{"name":"setdefault","type":"boolean","description":"sets domain version to be the default","required":false,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/DOMAIN_NAME/[VERSION]","description":"domain to update in SwaggerHub","required":true}]},"integration:create":{"id":"integration:create","description":"creates a new API integration from a JSON configuration file.\nSee the documentation for configuration files: https://github.com/SmartBear/swaggerhub-cli/tree/master/examples/integrations\nWhen VERSION is not included in the argument, the integration will be added to be default API version.\n","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:create organization/api/1.0.0 --file config.json"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"location of integration configuration file","required":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API where integration will be added","required":true}]},"integration:delete":{"id":"integration:delete","description":"deletes the integration from the given API.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:delete organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION/INTEGRATION_ID","description":"Integration to delete","required":true}]},"integration:execute":{"id":"integration:execute","description":"executes an integration for the given API.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:execute organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION/INTEGRATION_ID","description":"Integration to execute for given API","required":true}]},"integration:get":{"id":"integration:get","description":"retieves an integration for the given API.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:get organization/api/1.0.0/503c2db6-448a-4678-a310-f465429e9704"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION/INTEGRATION_ID","description":"Integration to fetch for given API","required":true}]},"integration:list":{"id":"integration:list","description":"list integrations on an API.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:list organization/api/1.0.0"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/[VERSION]","description":"API to list integrations on","required":true}]},"integration:update":{"id":"integration:update","description":"update the configuration of an API integration.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub integration:update organization/api/1.0.0/503c2db6-448a-4678-abcd-0123456789abc --file config.json"],"flags":{"file":{"name":"file","type":"option","char":"f","description":"location of integration configuration file","required":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/API_NAME/VERSION/INTEGRATION_ID","description":"Integration to update on the given API","required":true}]},"project:create":{"id":"project:create","description":"Creates a new project in SwaggerHub.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:create organization/new_project_name --description \"project description\"","swaggerhub project:create organization/new_project_name -a \"testapi1,testapi2\"","swaggerhub project:create organization/new_project_name --apis \"testapi1,testapi2\"","swaggerhub project:create organization/new_project_name -d \"testdomain3,testdomain4\"","swaggerhub project:create organization/new_project_name --domains \"testdomain3,testdomain4\"","swaggerhub project:create organization/new_project_name -a \"testapi1\" -d \"testdomain3\" --description \"description\""],"flags":{"description":{"name":"description","type":"option","description":"Description of project","required":false},"apis":{"name":"apis","type":"option","char":"a","description":"Comma separated list of api names to include in project","required":false},"domains":{"name":"domains","type":"option","char":"d","description":"Comma separated list of domain names to include in project","required":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The new project to create","required":true}]},"project:delete":{"id":"project:delete","description":"Deletes a project from SwaggerHub.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:delete organization/project_name"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"Project to delete","required":true}]},"project:get":{"id":"project:get","description":"Retrieves the details for a project.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:get organization/project_name"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"Project to retrieve the details for","required":true}]},"project:list":{"id":"project:list","description":"list projects","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:list","swaggerhub project:list organization"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER","description":"Organization to list projects for","required":false}]},"project:api:add":{"id":"project:api:add","description":"Adds an API to an existing project.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:api:add organization/project_name my_api"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The project to add the API to","required":true},{"name":"API","description":"The name of the API to add","required":true}]},"project:api:remove":{"id":"project:api:remove","description":"Removes an API from a project in SwaggerHub.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:api:remove organization/project_name my_api"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The project remove the API from","required":true},{"name":"API","description":"The API to remove","required":true}]},"project:domain:add":{"id":"project:domain:add","description":"Adds a domain to an existing project.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:domain:add organization/project_name my_domain"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The project to add the domain to","required":true},{"name":"DOMAIN","description":"The name of the domain to add","required":true}]},"project:domain:remove":{"id":"project:domain:remove","description":"Removes a domain from a project in SwaggerHub.","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:domain:remove organization/project_name my_domain"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"The project remove the domain from","required":true},{"name":"DOMAIN","description":"The domain to remove","required":true}]},"project:member:list":{"id":"project:member:list","description":"list members of a project","pluginName":"swaggerhub-cli","pluginType":"core","aliases":[],"examples":["swaggerhub project:member:list organisation/project_name"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"OWNER/PROJECT_NAME","description":"Project to list members of","required":true}]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "swaggerhub-cli",
3
3
  "description": "SwaggerHub CLI",
4
- "version": "0.6.2",
4
+ "version": "0.6.3",
5
5
  "author": "SmartBear",
6
6
  "bin": {
7
7
  "swaggerhub": "./bin/run"
@@ -2,7 +2,7 @@ const { flags } = require('@oclif/command')
2
2
  const { readFileSync } = require('fs-extra')
3
3
  const { getApi, postApi } = require('../../requests/api')
4
4
  const { getApiIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
5
- const { getOasVersion, getVersion, parseDefinition } = require('../../utils/oas')
5
+ const { getVersion, parseDefinition, getSpecification } = require('../../utils/definitions')
6
6
  const BaseCommand = require('../../support/command/base-command')
7
7
  const UpdateCommand = require('../../support/command/update-command')
8
8
 
@@ -18,13 +18,13 @@ class CreateAPICommand extends UpdateCommand {
18
18
  })
19
19
  }
20
20
 
21
- async tryCreateApi({ path, version, oas, flags }) {
21
+ async tryCreateApi({ path, version, specification, flags }) {
22
22
  const isNameAvailable = await this.checkApiName(path)
23
23
  const pathHasVersion = path.length === 3
24
24
  const fullPath = pathHasVersion ? path : [...path, version]
25
25
 
26
26
  if (isNameAvailable) {
27
- await this.createApi(fullPath, oas, flags, pathHasVersion)
27
+ await this.createApi(fullPath, specification, flags, pathHasVersion)
28
28
  return true
29
29
  }
30
30
 
@@ -38,12 +38,12 @@ class CreateAPICommand extends UpdateCommand {
38
38
  })
39
39
  }
40
40
 
41
- async createApi([owner, name, version], oas, flags, pathHasVersion) {
41
+ async createApi([owner, name, version], specification, flags, pathHasVersion) {
42
42
  const isPrivate = flags.visibility === 'private'
43
43
 
44
44
  const createApiObj = {
45
45
  pathParams: [owner, name],
46
- queryParams: { version, isPrivate, oas },
46
+ queryParams: { version, isPrivate, specification },
47
47
  body: readFileSync(flags.file)
48
48
  }
49
49
 
@@ -61,7 +61,7 @@ class CreateAPICommand extends UpdateCommand {
61
61
  async run() {
62
62
  const { args, flags } = this.parse(CreateAPICommand)
63
63
  const definition = parseDefinition(flags.file)
64
- const oas = getOasVersion(definition)
64
+ const specification = getSpecification(definition)
65
65
  const apiVersion = getVersion(definition)
66
66
  const apiPath = getApiIdentifierArg(args)
67
67
  const [owner, name, version = apiVersion] = splitPathParams(apiPath)
@@ -71,7 +71,7 @@ class CreateAPICommand extends UpdateCommand {
71
71
  path: [owner, name],
72
72
  version,
73
73
  flags,
74
- oas
74
+ specification
75
75
  }
76
76
 
77
77
  const createdApi = (
@@ -2,7 +2,7 @@ const { flags } = require('@oclif/command')
2
2
  const { readFileSync } = require('fs-extra')
3
3
  const { getApi, postApi } = require('../../requests/api')
4
4
  const { getApiIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
5
- const { getVersion, parseDefinition } = require('../../utils/oas')
5
+ const { getVersion, parseDefinition } = require('../../utils/definitions')
6
6
  const BaseCommand = require('../../support/command/base-command')
7
7
  const UpdateCommand = require('../../support/command/update-command')
8
8
 
@@ -2,7 +2,7 @@ const { flags } = require('@oclif/command')
2
2
  const { readFileSync } = require('fs-extra')
3
3
  const { getDomain, postDomain } = require('../../requests/domain')
4
4
  const { getDomainIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
5
- const { getVersion, parseDefinition } = require('../../utils/oas')
5
+ const { getVersion, parseDefinition } = require('../../utils/definitions')
6
6
  const BaseCommand = require('../../support/command/base-command')
7
7
  const UpdateCommand = require('../../support/command/update-command')
8
8
 
@@ -2,7 +2,7 @@ const { flags } = require('@oclif/command')
2
2
  const { readFileSync } = require('fs-extra')
3
3
  const { getDomain, postDomain } = require('../../requests/domain')
4
4
  const { getDomainIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
5
- const { getVersion, parseDefinition } = require('../../utils/oas')
5
+ const { getVersion, parseDefinition } = require('../../utils/definitions')
6
6
  const BaseCommand = require('../../support/command/base-command')
7
7
  const UpdateCommand = require('../../support/command/update-command')
8
8
 
@@ -11,7 +11,7 @@ const errorMsg = {
11
11
 
12
12
  cannotParseDefinition: 'There was a problem with parsing {{filename}}. \nReason: {{e}}',
13
13
 
14
- cannotParseOasVersion: 'Cannot determine OAS version from file',
14
+ cannotParseSpecification: 'Cannot determine specification from file',
15
15
 
16
16
  cannotParseVersion: 'Cannot determine version from file',
17
17
 
@@ -4,11 +4,20 @@ const yaml = require('js-yaml')
4
4
  const { existsSync, readFileSync } = require('fs-extra')
5
5
  const { errorMsg } = require('../template-strings')
6
6
 
7
- const getOasVersion = ({ swagger, openapi }) => {
8
- if (!swagger && !openapi) {
9
- throw new CLIError(errorMsg.cannotParseOasVersion())
7
+ const specVersionToSpecification = specVersion => {
8
+ if (/2.0$/.test(specVersion))
9
+ return 'openapi-2.0'
10
+ if (/2.\d+.\d+$/.test(specVersion))
11
+ return 'asyncapi-2.x.x'
12
+ return 'openapi-3.0.0'
13
+ }
14
+
15
+ const getSpecification = ({ swagger, openapi, asyncapi }) => {
16
+ if (!swagger && !openapi && !asyncapi) {
17
+ throw new CLIError(errorMsg.cannotParseSpecification())
10
18
  }
11
- return swagger || openapi
19
+ const specVersion = [swagger, openapi, asyncapi].filter(version => Boolean(version))[0]
20
+ return specVersionToSpecification(specVersion)
12
21
  }
13
22
 
14
23
  const getVersion = definition => {
@@ -34,7 +43,7 @@ const parseDefinition = filename => {
34
43
  }
35
44
 
36
45
  module.exports = {
37
- getOasVersion,
46
+ getSpecification,
38
47
  getVersion,
39
48
  parseDefinition,
40
49
  }